API design - splitting into different sub-domains (micro-services) API design - splitting into different sub-domains (micro-services) kubernetes kubernetes

API design - splitting into different sub-domains (micro-services)


As System Architect I think it is better to have a single unified API domain where we do HTTP (layer 7) routing to reach our endpoints. You can make your system more flexible without any changes for your clients. For example you have a microservice with routes:

  • api.todos.com/route1
  • api.todos.com/route2

In future you can split the microservice by this routes.

But mostly, it depends on what API Gateway will you use. API gateway is single entry point in your system, what proxy request to correct microservice. Also it make auth and cache. More about this microservice's pattern you can read here.