prisma-aws-cloudformation icon indicating copy to clipboard operation
prisma-aws-cloudformation copied to clipboard

Web api server along with Prisma and Database

Open yodaheis opened this issue 5 years ago • 1 comments

Most people use a web api server like Apollo Server or Graphql yoga etc in front of their Prisma servers in real world applications. I'm opening this issue to discuss and keep track of Cfn template with the whole stack

yodaheis avatar Aug 29 '19 06:08 yodaheis

Overall architecture I'm proposing, Network:

  • 1 VPC
  • 2 Subnets (1 Private and 1 Public) in each Availability Zone. (We'll start with 2 availability zones)

Load Balancing:

  • 1 Internet-facing Application Load Balancer for Web Api accepting only HTTPS connections and sticky sessions enabled
  • 1 Internal Application Load Balancer for Prisma accepting HTTP and sticky sessions enabled with ingress from Web Api server SG only

Build and running environment:

  • 1 ECS Cluster each for Web Api and Prisma running on Fargate
  • RDS for database

Additional measures:

  • Secret Manager integration for managing secrets in environment variables
  • Logs for Web Api, Prisma and Database services
  • Direct Connect / VPN for handling management api operations on Prisma (since it is isolated from the internet)

Let me know your thoughts and if anything else you need. I'll open a PR for this

yodaheis avatar Aug 29 '19 06:08 yodaheis