0

In a case where having microservices deployed as containers without any orchestration tool, they need to define some HTTP response headers.

I understand a way to achieve it by having each microservice define their own headers, and also by creating an API gateway that attaches them to each microservice response.

For one side, managing them at the microservice level gives a lot of independence as it doesn't make them depend on other components. On the other side, having them at the proxy level frees the microservice of some "non-core" tasks and centralizes it in a network-specific component.

Is there any preferred way to handle this situation?

Thanks in advance.

5
  • 2
    What kind of headers are you talking about?
    – Euphoric
    Mar 25 at 11:38
  • yeah response headers? dont you mean request headers?
    – Ewan
    Mar 25 at 12:58
  • I mean the response headers, that the microservice defines, for example a Server header
    – lewislbr
    Mar 25 at 13:00
  • 1
    You've already articulated the tradeoffs. The "preferred" way is the way that best orchestrates those tradeoffs. Mar 25 at 13:22
  • I see, thanks !
    – lewislbr
    Mar 25 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.