According to this answer https://stackoverflow.com/a/41811770/2849613 I would like to get a little bit more information about best practices with microservices on Heroku.
The question is which approach is better?
- Install every services as independent app, and use one of them as REST "proxy" (for example Netflix Eureka)?
Or
- Create docker based approach with, for example Netflix Zuul as a load balancer?
On my own I see already some pros and cons of both approaches:
Pros: better scalability (easy to create new machines for bigger load). Cons: communication between services goes "outside of heroku" in other words: because heroku app have public address everyone can connect directly to service (without going threw Eureka), because of that every services need to provide some authentication method and share it between each other - I think that this is risk prone.
Pros: easy to reproduce production environment for tests and develop (docker image), communication between services is done "internally" (image to image instead app to app). Cons: hard to scale (I think that load balancing between Heroku apps and then docker images is a little bit overhead).
Which approach is better? Maybe I can mix them together? Or maybe there is some different, better solution?
Do be honest the only thing which I am sure, is that I want to use rabbitMQ as a message queue...