Was this page helpful?
ScyllaDB Cloud allows you to connect to a cluster in different ways:
You can migrate from one connection to another, in some cases, without network interruption.
This guide provides general steps to migrate from one connection to another and a particular example of how to migrate from AWS Virtual Private Network (VPC) Peering to AWS Transit Gateway (TGW) VPC Attachment Connection.
There are many connection statuses, but in regard of migration, the following statuses are relevant:
ACTIVE - Connection is deployed on the cloud and actively used in making routing decisions. Traffic is going to be routed through it unless there are common CIDRs with other ACTIVE connections.
INACTIVE - Connection is deployed on the cloud but it is not participating in routing decisions. Traffic is never routed through it.
Cluster connections are prioritized by creation date, with older connections having priority. This priority plays out only when two connections have common CIDRs; for each common CIDR, the oldest ACTIVE cluster connection is picked as the routing endpoint while other connections are ignored.
Before proceeding with migration, make sure that you have a personal access token for your ScyllaDB Cloud account. See Create a Personal Token for Authentication for instructions on how to obtain it.
Create NEW cluster connection. It is assumed that at least some of CIDRs exist on both OLD and NEW connections.
At this point, traffic from both ends goes via OLD cluster connection.
Direct traffic from your network to the cluster via NEW cluster connection. It is done in your AWS Account and VPC.
At this point, traffic from your network goes via NEW cluster connection, while traffic from the cluster to your network goes through OLD cluster connection.
Set OLD cluster connection to INACTIVE.
ScyllaDB Cloud will direct cluster traffic through NEW cluster connection.
Now traffic from both ends goes through NEW cluster connection.
Direct traffic from your network to the cluster via OLD cluster connection. It is done in your AWS Account and VPC.
At this point, traffic from your network goes via OLD cluster connection, while traffic from the cluster to your network goes through OLD cluster connection.
Set OLD cluster connection to ACTIVE; optionally you can set NEW cluster connection to INACTIVE.
ScyllaDB Cloud will direct cluster traffic via OLD cluster connection. Now traffic from both ends goes through OLD cluster connection.
The following example shows you how to migrate from AWS VPC Peering to AWS TGW VPC Attachment
(and back) via ScyllaDB Cloud API using your account ID. You can get the account ID using
the https://api.cloud.scylladb.com/account/default
endpoint;
see Gives account details tied to authorized user.
Create AWS TGW VPC Attachment cluster connection, following the steps from Setup AWS TGW VPC Attachment Connection.
By Routing traffic from your application to the cluster via TGW, you are going to direct traffic from your network to the cluster via the new cluster connection.
Set AWS VPC Peering cluster connection to INACTIVE.
curl --request PATCH \
--url https://api.cloud.scylladb.com/account/<ACCOUNT-ID>/cluster/<CLUSTER-ID>/network/vpc/peer/<VPC-PEERING-PEERING-CONNECTION-ID> \
--header "Authorization: Bearer <TOKEN>" \
--header "Content-Type: application/json" \
-d '{"status": "INACTIVE"}'
Set AWS VPC Peering cluster connection to ACTIVE.
curl --request PATCH \
--url https://api.cloud.scylladb.com/account/<ACCOUNT-ID>/cluster/<CLUSTER-ID>/network/vpc/peer/<VPC-PEERING-PEERING-CONNECTION-ID> \
--header "Authorization: Bearer <TOKEN>" \
--header "Content-Type: application/json" \
-d '{"status": "ACTIVE"}'
Set AWS TGW VPC Attachment to INACTIVE.
curl --request PATCH \
--url https://api.cloud.scylladb.com/account/<ACCOUNT-ID>/cluster/<CLUSTER-ID>/network/vpc/connection/<TGW-VPC-ATTACHMENT-CONNECTION-ID> \
--header "Authorization: Bearer <TOKEN>" \
--header "Content-Type: application/json" \
-d '{"status": "INACTIVE"}'
It will direct traffic from the cluster via AWS VPC Peering, while traffic from the cluster to your network through AWS TGW VPC Attachment cluster connection.
Direct traffic from your network to the cluster via AWS VPC Peering:
Open AWS Cloud Console at VPC> Route tables.
Find and select the main route table for your VPC (the one that has Yes in the Main column).
Click Actions> Edit routes.
Find the route to Cluster Datacenter CIDR. In the Destination column, select Peering Connection for Target and select your VPC peering ID from the drop-down list below it.
Click Save changes.