> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/servers/how-to/como-desplegar-servidores-en-multiples-zonas-de-disponibilidad.md).

# How to deploy servers in multiple availability zones

In this tutorial you will learn how to create a basic distributed architecture by deploying **two servers in different availability zones within Madrid.**\
At the end, you will have both servers up and running and connected to the same network, ready to build continuity or high availability scenarios.

{% hint style="info" %}

#### 👍 What you get

Two operational servers, one in each availability zone, connected to the same network and ready to build a cross-zone continuity architecture.
{% endhint %}

{% hint style="warning" %}
**Important:** distributing servers across zones does not automatically configure high availability (HA) for your applications or data. Replication, load balancing, or the failover mechanism will depend on the architecture you design.
{% endhint %}

### What an availability zone is and why it matters

Availability Zones in Plenit work through independent physical datacenters in Madrid: MAD1 (Digital Realty) and MAD2 (Data4). Each zone has independent physical infrastructure (electricity, hardware, security...). Distributing components between both allows you to design services that do not depend on a single physical location.

Plenit lets you choose which zone each server is deployed in and use networks available in both zones. You decide how to distribute the infrastructure components and what continuity mechanisms you need for them.

Before creating anything, decide:

* Which servers go in MAD1 and which in MAD2?
* What type of network do you need?
* What happens in your architecture if one zone goes down?

If the answer to the third question is unclear, the recommended first step is to design the architecture.

### Prerequisites

* Be registered on the platform with an active organization.
* Have a clear architecture: which server goes in each zone and how they connect.
* Know what type of network you need before starting (if you're not sure, review the network section of this tutorial before you begin).

### Step 1. Create a Servers service

From the menu, go to Servers and enter the subscription where you want to work. Inside the service, click New Server. The creation wizard will open.

### Step 2. Choose the location (MAD1)

This is the most important step. Select:

* Region: Madrid
* Availability zone: MAD1 (or MAD2, but remember that the other server has to be in the zone not chosen for this first server)

Choose the zone where you want to activate the server. You cannot continue without selecting a zone.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-7c5b56dfa025fe7dd5222f74433f31f261ed3276%2FSelecci%C3%B3n%20de%20Zona%20de%20Disponibilidad.jpg?alt=media" alt=""><figcaption><p>Availability Zone Selection</p></figcaption></figure>

### Step 3. Configure the server

In the different steps of server creation, you will be able to select the CPU and RAM you need, the operating system image, and the applications you want to preinstall. You can also configure disks, the backup disk (included), and additional disks.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-b0c14392c23331078d6656f00c2c533a5867ee3e%2FConfiguraci%C3%B3n%20de%20discos.jpg?alt=media" alt=""><figcaption><p>Disk configuration</p></figcaption></figure>

### Step 4. Configure the network

You have three network types available. Choose according to your case:

| Type     | When to use it                                                                                                                                   | HA available |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |
| Standard | General case. Flat network, all servers can see each other. Choose this option if you do not need segmentation.                                  | Yes          |
| VPC      | When you need segmentation into layers (application, database...). Servers in different Tiers do not see each other by default.                  | Yes          |
| L2       | When you manage your own network services on top, usually with a VNF such as FortiGate or WatchGuard. No gateway or DNS managed by the platform. | No           |

Standard and VPC networks can also be configured with High Availability (HA), adding redundancy to network components between zones. You do not need to enable it for servers deployed in MAD1 and MAD2 to use the same network. We will see when to use it and how to configure it in the tutorial [How to enable High Availability (HA) on the network between two availability zones](https://docs.plenit.com/docs-en/productos/servers/how-to/como-habilitar-alta-disponibilidad-ha-en-la-red-entre-dos-zonas-de-disponibilidad.md).

{% hint style="info" %}
L2 networks do not have an HA option because network services are usually managed through a VNF.
{% endhint %}

For this tutorial, create a new network with the Standard type.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-6e0af5c1639f55568787e92630eb7e1aeb6a42f2%2FSELECC~1.JPG?alt=media" alt=""><figcaption><p>Selection of "Standard" network type and <em>network name field filled in</em></p></figcaption></figure>

### Step 5. Final settings

Give the server a descriptive name and add a tag with the zone. When you have multiple servers across two zones, this is what lets you identify them at a glance.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-97bb45cd0cc25f768ff75c469bd99e1fcce15330%2FCAMPOD~1.JPG?alt=media" alt=""><figcaption><p>Name field filled in and option to add a tag</p></figcaption></figure>

Click Create Server. The platform will notify you when the server is ready.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-0c5ba06f8eea4b1f8c812950a48ec05c700f1b87%2FSERVID~2.JPG?alt=media" alt=""><figcaption><p>Server created with location field information (Madrid, where the two Availability Zones are located) and Network Space (Availability Zone)</p></figcaption></figure>

### Step 6. Create the second server (MAD2)

Repeat steps 2 to 5 with these differences:

* Select MAD2 as the zone
* When you are in the "Network" section of the server creation wizard, select the network you already created instead of creating a new one. That way, both servers will be connected to the same network.
* Assign a name and tag to the new server that help identify and distinguish it from the previously created server.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-18864a5837343a0ed2ff72986f63eae491253eff%2FCREACI~1.JPG?alt=media" alt=""><figcaption><p><em>Creation of the second server, with the existing network selected</em></p></figcaption></figure>

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-baf71a22ec654adfe1ecad836a5f0e47746eda9a%2FSERVID~1.JPG?alt=media" alt=""><figcaption><p>Server created with a different name and tag from the previous one</p></figcaption></figure>

### Step 7. Verify the architecture

When both servers are in ON status, verify that everything is correct:

* In the server list, verify that each server is deployed in a different availability zone: one in **MAD1** and the other in **MAD2**.
* Check that both use the **same network**.
* In the diagram view, verify that the two servers appear in their respective zones and are connected to that network.

If both show the same zone, go back to Step 3. Review the selected location before continuing.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-fdd4134dbbc12c8ce29c19d2d6566ede66db341a%2FLISTAD~1.JPG?alt=media" alt=""><figcaption><p>Server list with two servers in ON status located in MAD1 and MAD2 respectively</p></figcaption></figure>

In the diagram, you should see the two servers on separate branches, each in its zone, connected to the same network.

<figure><img src="https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Fgit-blob-74545a5f3adefc1fdf705e3b4b81f131c383cedf%2FESQUEM~1.JPG?alt=media" alt=""><figcaption><p>Diagram with the servers visible in their respective locations, connected to the same network</p></figcaption></figure>

{% hint style="info" %}
If you also need to check communication between both servers, you can run a connectivity test. On Windows servers, remember that the firewall may block ICMP traffic by default, so a `ping` failed ping does not necessarily mean that there is no connectivity.
{% endhint %}

{% hint style="warning" %}
**Important:** if you have Windows servers on the network, by default the Windows firewall blocks ICMP traffic between subnets. You will need to create an inbound rule to allow ICMPv4 if you want to verify connectivity with ping. This is covered in the tutorial [How to enable HA on the network and configuration best practices](https://docs.plenit.com/docs-en/productos/servers/how-to/como-habilitar-alta-disponibilidad-ha-en-la-red-entre-dos-zonas-de-disponibilidad.md).
{% endhint %}

### Conclusion

You now have two servers deployed in independent availability zones and connected to the same network. You already have the infrastructure base on which to build the continuity strategy your client needs.

The next step depends on what you are building. If you need to configure high availability and network best practices, continue with the tutorial "How to enable HA policy and best practices".


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.plenit.com/docs-en/productos/servers/how-to/como-desplegar-servidores-en-multiples-zonas-de-disponibilidad.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
