Skip to content

Architecture Documentation

Charlotte Kies edited this page Sep 10, 2023 · 1 revision

Version 2.0

Version Summary

  • Leverages AWS Lambda and API Gateway
  • Removes Spring Boot Resource Server. Replaced by API Gateway
  • Removes need for proxy web server

Benefits

  • Remove heavyweight spring boot server
  • No need to pay for Lightsail or EC2 with memory sufficient to host Spring Boot resource server.
  • Reduced cost
  • DDoS protection

How it Works

  • API Gateway defines endpoints and trigger AWS Lambda functions
  • AWS Lambda functions establish connections to database running on Lightsail Instance and handle CRUD operations. Return response to the client

Diagram

Version 2.0 Architecture Diagram

Version 1.0

Version Summary

  • Leverages AWS Lightsail, Java with Spring Boot, NGNIX as a proxy server, and PostgreSQL

Benefits

  • Can host multiple resource servers for multiple applications
  • Can define and host multiple backend applications and services on the same instance
  • Serves as a great playground to learn about managing backend services with server-based/traditional architecture

Downsides

  • Need to pay for a Lightsail or EC2 instance large enough to host spring boot application
  • Need to manage servers. High maintenance.
  • Manually managing security against potential attacks including DDoS

How it Works

  • Resource Server defines endpoints
  • NGINX Webserver listens on open port. Directs HTTPS requests to different Spring Boot applications running on different ports, based on the domain in the endpoint
  • Resource server establishes connection to database running on same Lightsail Instance, handles CRUD operations and returns response to the client

Diagram

Version 1.0 architecture diagram