0

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

A way to achieve it is by having each microservice define their own headers. Another way is 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.

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.