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

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.

Solutions/Answers:

Solution 1:

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.

Related:  Hibernate Join table in microservice architecture

Solution 2:

If your Zuul instance is down. You might not be able to direct to other services through the api gateway.

As a solution i would suggest you to go for a clustered solution with two zuul instances.
There you need two client side service registry services (Eureka Servers) .

If you are planning to manage fault tolerance, you can apply sentinel.

Your micro services become eureka clients.

You have to register your micro services in both of the eureka servers and make a eureka server cluster. You can refer to below diagram as a design /architecture diagram for implementation.

Note : You have to maintain two end points for both of the zuul servers. If zuul 1 is down , client can request to zuul 2.
This will help you to achieve zero down time .(You need to make sure that your VM platform is reliable and no unplanned downtimes).

enter image description here

References