Try tten for free
Set up your server in minutesTry for free
Try tten for free
Try for free

Executive Summary

## How we successfully moved hundreds of virtual servers between data centers, with our customers' public and local IPs staying the same and no data loss, with ZERO minutes of downtime for systems designed as high-available clusters and a maximum of 8 minutes of downtime for systems not designed that way.

We moved the services at our first service point to our new service point in Istanbul.

Our main goal was to carry out a smooth migration, with no downtime or data loss, without changing any WAN or Local IP addresses, in both our customers' systems and our own.

So how did we do it?

tten is made up of a team that loves free software and open-source projects. We took advantage of the core strengths of CEPH, which made this migration possible and which is already the foundation of our Disaster Recovery service.

TL;DR of the infrastructure components we used:

  1. CEPH

  1. KVM

  1. VXLAN

In this document, we will share the details, from infrastructure components to data replication methods and from VXLAN/IPsec tunnels to BGP announcements, in the hope that they will be useful for the curious.

The scoreboard of our first service point in brief:

  • A total of 32 KVM hypervisors

  • A total of 256 NVMe disks, 8 on each hypervisor

  • 3 CEPH Pools running on 256 OSDs

  • 450 TiB of data on the Ceph Pools (3 replicas x 150 TiB effective)

  • Hundreds of VMs (web servers, database clusters, firewall virtual servers, etc.)

After we set our target to move this whole system to our new location in a short time of 8 days, we spent our entire first day planning with a team that has felt time pressure many times throughout their careers, and we created our flight plan. We started our operation after reaching a consensus on what would be done at each step of the process.

On the second day of the operation, we locked ourselves in the data center and carried out the installations, which mostly required physical effort. At our new service point, we brought our new backbone router, switches, and hypervisors into service. This new infrastructure started its life as a small cluster, as originally planned.

Because our internet prefixes had to be able to work in both data centers during the transition, the first thing we did once the infrastructure at the new service point was up was to configure VXLAN.

With the support of our internet service providers (ISPs), the VLAN that holds our internet prefixes was extended as a VXLAN.

When extending the VLAN that carries internet traffic with VXLAN, we had this part done on our ISPs' devices to avoid possible MTU (Maximum Transmission Unit) size problems.

This way, we were able to use our IP prefixes at both of our service points at the same time.

The Virtual Data Center (SVM) - Virtual Datacenter (VDC) service that tten provides and its network layer topology are, respectively:

  • Every VDC product includes a virtual firewall.

  • The firewall's WAN leg has as many WAN IP addresses as the customer needs.

  • The firewall's LAN leg is connected to a VLAN dedicated to the VDC.

  • Our customers handle their IP NAT needs using tten's Core Panel.

  • The BGP announcements of our IP prefixes are made as /24.

  • Our customers' WAN IP needs are met by assigning IP addresses chosen from the announced prefixes to our customers' firewalls.

With this, we were ready for the first VDC migration and started our first tests. After the tests passed, we put the migration operation into action.

The steps we planned for the migration were as follows:

  1. Select the virtual disks of the virtual servers that belong to the VDC product to be migrated, and have them mirrored from the old service point to the new one with CEPH's RBD Mirror daemon.

  1. Create the snapshot mirroring schedules.

  1. After the initial synchronization, wait for the resulting delta data to be synchronized again every 5 minutes.

  1. After all of the data has been transferred, as soon as we were sure the delta data could also be transferred within the 5-minute cycle, ask our customers for a time window for a 10-minute downtime.

  1. Power off all the virtual servers that belong to the VDC in a controlled way.

  1. Wait for all the delta data to be transferred with the next rbd-mirror operation.

  1. After the delta data is transferred, synchronize the VM configuration files.

  1. Activate the VDC at the new service point

The output of "rbd mirror pool status IST1-CEPH1-RBD2 --verbose" is not very easy to read with the human eye. To parse it into the form we needed, convert it to CSV format, and turn it into a spreadsheet refreshed every minute to make it easier to read, we developed a simple bash script:

Using the App-Script feature of Google Spreadsheets, we made sure this CSV file, created with crontabs, was updated at the start of every minute.

As our customers' VDC products were shut down at the old service point and activated at the new one, the resources needed at the old location gradually started to decrease.

After we moved enough virtual servers to the new service point that we could retire 10 hypervisors from the old service point, we disabled the OSDs on those hypervisors.

At this stage, what we had to do was wait patiently.

After the rebalancing of the CEPH Placement Groups according to the Crush Map finished, we took delivery of those hypervisors from our old service point and configured them at our new service point to run under the new hypervisor and CEPH cluster.

After each physical operation (removing a hypervisor from the old cluster, adding a hypervisor to the new cluster), we had to keep waiting patiently.

We had to visit the old service point 4 times in total for the physical moving processes.

Until the last VDC migration was completed, the BGP announcement of all our internet prefixes continued from our old service point. After the migration, the BGP announcement of the old service point was shut down and the same blocks started to be announced from the new service point. Cutting the announcement from the old point and making it from the new point required one more downtime of less than 1 minute.

During the transition, successful migrations with ZERO downtime were possible for customer systems that have HA Cluster (High Availability) structures.

For example, for our customers with a Percona XtraDB Cluster, we ran their VLANs in both locations with VXLAN, in the same way we moved the internet VLAN.

In clustered structures, instead of migrating all the virtual servers of a VDC at once, we carried out the migration VM by VM in a controlled way, in coordination with our customers, and some of our customers experienced zero downtime in this process.

However, considering the migration operation of the VDC with the longest downtime, we completed the whole process with a maximum operational downtime of 8 minutes in total plus the downtime that came with the final BGP announcement change of 1 minute, which means our customers experienced less than 10 minutes of downtime.

We carried out all of these operations in a short time of 8 days.

As we targeted, the migrations were completed without any change to the WAN and Local IP addresses of all our customers.

Written by

Emre

Göktepe

On this page

You are in full control

Build your infrastructure today

Get started in minutes and take your project live. No commitment.