Skip to main content

Regions and Data Centers

The Arvancloud Cloud Container infrastructure is deployed on Kubernetes in 3 data centers: Bamdad, Simin, and Forough. This makes it possible to design multi-zone architectures for the highest stability and availability.

Each region in cloud infrastructure contains one or more separate data centers, called zones or Availability Zones. On the one hand, these data centers are close enough to each other to support low-latency connections, and on the other hand, they're far enough apart to reduce the chance of outages caused by natural events and local disruptions. Zones have independent power, cooling, and networking, and are designed so that if one becomes unavailable, the other data centers can keep working. This approach helps users prevent disruptions and interruptions in access to applications by deploying their services' infrastructure across several zones.

Benefits of a Multi-Zone Architecture​

Kubernetes is designed so that a cluster can be set up and run across several zones. Using this feature and the Arvancloud Cloud Container zones, you can easily set up a multi-zone architecture for your applications. This approach provides several benefits for your service.

  • Availability

    By distributing resources among several data centers, even if one zone becomes unavailable, users can access services without interruption, because one or two other zones are still working without problems.

  • Stability and resilience

    Multi-zone Kubernetes infrastructure automatically distributes the load among healthy data centers. This increases stability and fault tolerance. For example, if one of the data centers becomes unavailable, the load is automatically moved to another data center, preventing errors.

  • Scalability

    In a multi-zone infrastructure, you can easily scale Pods automatically or manually in different zones to make sure the application works without interruption at peak traffic and load.

  • Cost management

    If your application's current architecture, concentrated in one zone, has more than one replica, you can upgrade your architecture and implement redundancy across several zones at no extra cost. This way, your current replicas are simply placed in different zones, increasing the service's availability and stability without increasing costs.

Another approach used for redundancy in Kubernetes is multi-cluster Kubernetes, in which several independent clusters that can be replicas of each other are deployed in one or more data centers. Although this method increases the application's redundancy and availability, it doesn't allow active/active architectures because of high latency. That's why multi-zone architectures in Kubernetes are recommended.

Multi-Zone Kubernetes​

Kubernetes can automatically distribute Pods among the different nodes of a cluster. This helps reduce the impact of disruptions. When a node starts, a label is added to it that can include data center or zone information. If your cluster spans several zones, you can use these labels together with a concept called Pod Topology Spread Constraints to specify how Pods are distributed and placed across zones. For example, you can specify that Pods are placed equally in each zone.

kind: Pod
apiVersion: v1
metadata:
name: mypod
labels:
foo: bar
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
foo: bar
containers:
- name: pause
image: registry.k8s.io/pause:3.1

You can also use another concept called Pod Anti-Affinity to make sure similar Pods aren't placed on the same node or zone.

apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- my-app
topologyKey: "failure-domain.beta.kubernetes.io/zone"
containers:
- name: my-app
image: my-app-image

For more details, read the guide to creating a Multi-Zone application in the Arvancloud Cloud Container.