Search code examples
javaspring-bootmicroservicesnetflix-zuul

is Zuul being the unique entrypoint to my app a disadvantge?


i've been using Zuul in my micro-services based application for a while now, and it's been working perfectly.

now i've been asked a question by someone that made me think that micro-services world is not all rainbows and flowers after all.

so the question was " you have Zuul as the sole entrypoint to you app, isn't that some sort of centralization ? what if zuul is down ? "

i just wanted to gather some opinions, and get an answer to that question.

thank you.


Solution

  • Yes it is entry point and it serves many pros having single entry point in your micro service architecture.

    Pros: I can think of on top of mind

    1. Single point of contact for all you API users(Apps). Zuul running at api.yoursite.com and calling it every time is better than calling individual services(service1.yoursite.com, service2.yoursite.com) from you api consumers.

    2. Security point of view, you have to deal with only one server's security and you can hide all the other servers running your services in network and not exposing them on public internet. Amazon AWS and many other providers provides such facility.

    3. You can leverage routing benefits using zuul as your entry point you can route 80% traffic to service1 old version while 20% to your same service1 new version.

    Cons:

    Great power comes with great responsibility. If your main zuul server is down your whole app is down.(Edit: only if you have one zuul setup). Please check @lahiru's answer how you can have multiple zuul cluster using eureka registry configuration.