Deploying SymmetricDS to AWS ECS

Max Pettit
Data Weekly by Jumpmind
3 min readNov 1, 2018

Amazon Elastic Container Service provides an easy to use, scalable solution for quickly deploying Docker containers in the cloud. A previous Data Weekly article discussed some the advantages of using SymmetricDS in a Docker container. The combination of Docker and AWS ECS makes it simple to deploy SymmetricDS replication for Amazon RDS databases.

One important consideration when using SymmetricDS is that each node’s SymmetricDS server should be as close as possible to its corresponding database. Ideally, the SymmetricDS node should be in the same LAN as its database. This is because SymmetricDS uses JDBC connections to connect to a database, which are not well optimized for a WAN. For this reason, it is most optimal to use Amazon services to host SymmetricDS servers when replicating Amazon RDS databases. These servers can be setup in a Virtual Private Cloud (VPC) to create a secure network with their databases or other cloud services.

Getting Started

Create a Docker Image

A Docker image can be used to define a SymmetricDS installation and parameters. JumpMind has published an official SymmetricDS Docker image that can be used as a parent image to create individual installations, each with their own configurations or additional services.

Create a Repository

In order to deploy Docker images to AWS, the docker image must be stored in a repository. Amazon ECR provides private repositories that can be easily connected to AWS ECS. The AWS Console provides a wizard to create repositories. Enter the desired repository name and the wizard will display detail instructions on how to build and push Docker images to the repository.

Create a Cluster

A cluster is a logical grouping of tasks or services that can be scaled dynamically. The AWS Console provides a simple wizard to create clusters. The wizard prompts for several configuration options, EC2 Key Pairs to connect to each EC2 instance over SSH, EC2 instance type, and number of instances. Amazon provides detailed documentation on each cluster configuration option.

Create a Task Definition

A Task Definition is used to specify container configuration options and arguments for each Docker image. These configuration options include how much CPU and memory to use for each container, data volume options, and Docker networking options. Amazon also provides instructions on each step of the task definition wizard.

Create a Service

Services are used to map a task definition to a cluster. The AWS Console provides a service creation wizard within each cluster. Services can be scaled dynamically to run multiple instances of task definitions. Service definitions include parameters to specify scaling options, load balancing, and task placements. For a typical SymmetricDS installation, the most logical task placement template is “One Task Per Host”, i.e. one SymmetricDS server per ECS instance.

Configure SymmetricDS

Once SymmetricDS has been deployed to an EC2 instance, SymmetricDS can be configured via the database or by connecting to the EC2 instance over SSH. The SymmetricDS documentation provides further details on how to configure replication for a database.

--

--