Arpit Jain
Aug 4, 2023

--

Thanks! Regarding your question, it is interesting. Let's take a few examples, `help.comapnyA.myawesomesite.com` or `app.companyA.myawesomesite.com`. Here, `help`or `app` -> the first part is defining the context in which user is making the call. Let us add a servlet filter that extracts this part and directs the call to the appropriate backend (help service, or app service). Next, each of these micro-services can further extract the second subdomain (`companyA`) using another servlet filter. We can use a single datasource to store all the possible second subdomains to maintain consistency. This is a potential high level design for a 2 part subdomain system.

--

--

Arpit Jain
Arpit Jain

Written by Arpit Jain

Scalability & Big Data Enthusiast | Microsoft | Sumo Logic | UW Madison | Myntra | IIT Guwahati

No responses yet