lwzjf / spring-multitenant-ha-boilerplate

Providing a Spring Boot based template for multi tenant and highly available applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-tenant and Highly Available Application Boilerplate

based on Spring Boot 2

This an incubator project to try out various technologies in the domain of Cloud Applications. This project is just a tool for creating modules that gives real value for developing applications.

Concepts & Technologies

Multi-tenant

  • Get tenant ID
  • from server name (subdomain) *
  • from request header
  • from user DB entity
  • Separate tenant data
  • by using tenant descriptor field for all data
  • by using separate DB schema per tenant *
  • by using separate phisical database per tenant
  • Managing configuration externally and without the need of application restart *

Highly Available (HA)

  • Persist session data *
  • Persist application caches
  • Persist data
  • Zero downtime deployment support
  • Communication between services & circuit breakers

AWS CI/CD

  • Migrate the whole application inside Amazon infrastructure **
  • Migrate the whole build and deploy pipeline to Amazon infrastructure **

Items marked with * (asterisk) is in the primary scope of this project. Items marked with ** (double asterisk) is in the primary scope of this project.

Artifacts to create (in separate repositories)

  • Auto-configuration for retrieving tenant ID (e.g.: spring-boot-starter-multitenancy)
  • Auto-configuration for separating tenant data (e.g.: spring-boot-starter-multitenancy-data)
  • Auto-configuration for persisting session data (e.g.: spring-boot-starter-multitenancy-session)
  • Auto-configuration for cloud config (e.g.: spring-boot-starter-multitenancy-config)

To be supported technologies

  • Spring Boot 2 / Spring Framework 5
  • SQL databases (MySQL, AWS Aurora)
  • no-SQL databases (MongoDB, AWS DynamoDB)

About

Providing a Spring Boot based template for multi tenant and highly available applications.

License:MIT License


Languages

Language:Java 100.0%