Deployment Guide on AWS
This document explains how to deploy ScalarDB GraphQL servers on the Amazon EKS environment.
We will deploy multiple GraphQL servers to an EKS cluster with an AWS Load Balancer Controller, which manages an internal AWS Application Load Balancer. The AWS Application Load Balancer handles HTTP cookie-based session affinity. When we deploy multiple GraphQL servers, session affinity is required to handle transactions properly. This is because GraphQL servers keep the transactions in memory, so GraphQL queries that use continued transactions must be routed to the same server that started the transaction.
What we create
In this guide, we will create the following components.
- A VPC with NAT gateway
- An EKS cluster with a Kubernetes node group
- A managed database service
- A bastion instance with a public IP
- An internal ALB for load balancing HTTP requests using the AWS Load Balancer Controller.
Step 1. Configure an EKS cluster
Please follow steps 1 to 3 in the Deploy ScalarDL on AWS guide to set up a VPC, subnets, a bastion host, a database, an EKS cluster, and a node group.
Note: That guide instructs to add a label to the node group with a key agentpool
and a value scalardlpool
. However, since we will deploy GraphQL servers, not ScalarDL, we should change the label. For example, the node group can be labeled with a key agentpool
and a value scalardbgraphqlpool
. The label can be used to select nodes when deploying ScalarDB GraphQL servers.
In this document, a placeholder cluster name <your-cluster-name>
will be used in command examples. Please change it to your cluster name.