Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Your third paragraph, that's what I meant. Although is it really okay if the API Gateway sends requests to multiple APIs synchronously? Or is that bad design? Commented Dec 5, 2018 at 16:29
  • 1
    @ShahlinIbrahim There are very few objectively "bad designs" in my opinion. There may be designs which better suit certain requirements than others, so it's hard to say without knowing what you're actually doing. That said, having a Gateway that composes an API response from several microservices is not uncommon, it's just not the best thing in all situations. Tell us more about your actual business problem and I can give better advice. Commented Dec 5, 2018 at 18:26
  • I have edited the question and added an example of the business problem Commented Dec 5, 2018 at 19:16
  • 1
    No, I'm saying that not everything needs to be the smallest possible microservice. Microservices should be logical chunks of work, which might mean that they do more than one thing under the hood (in your programming language of choice). If nothing else talks to the Furniture Placement service except the Furniture Selection service, then you don't need them to both be web-accessible services. Even if other things need to talk to both, it might make more sense to expose them as different API calls on the same service. Commented Dec 5, 2018 at 19:59
  • 1
    This is the how I'm planning on solving the issue. Have one service called Room Design which contains two packages or libraries - Furniture Selection and Furniture Placement. This way they're still separate packages and can be independently developed but can also be put together using the Room Design Microservices Commented Dec 6, 2018 at 6:03