0

Currently we are developing our microservices by running them all locally using docker. We are now limited by the resources of our local machine and we are trying to find a solution to scale our development environment.

We want to keep quick feedback and our current debugging tools/IDE locally.

Based on this article we think the best solution for us would be to have a local proxy that connects to another cloud proxy that would stub the service being developped.

See schema below:

1

The local proxy would be used to avoid updating local endpoints, so if we need X services locally, it would start X listeners and forward requests to the cloud.

The cloud proxy would take these requests and stub the corresponding services. Responses from services would be sent back to the local proxy.

Is this solution doable ? How would you implement such solution ? Is there a better way ?

  • Why do you need to run all microservices together on dev machine and why do they need to actually run in docker? I am building microservices here, and we have this thing called dev environment. it's purpose is - development! Means i am debugging whatever locally, but whenever something needs to talk to something else - i am targeting that dev environment in the cloud. I never need to debug more than one MS at a time, and if you do, i'd argue the code is not properly structured (or not tested enough). – zaitsman Nov 9 '17 at 6:59
  • we are working in the video industry and we have particular requirements regarding video transcoding for example. it makes it difficult to use it locally or redirect stream from the cloud using push protocol like rtmp. even a few microservices are enough to outgrow our machines. we develop one at a time whenever possible but particularities of video processing makes it very difficult sometimes. – Pat-rice Nov 9 '17 at 18:24
1

It sounds like you're thinking of writing new service-specific code for this proxy/stub. That's not what that article was talking about. It should be as much like production as possible, only your service's packets are going through a tunnel. I would start with ssh port forwarding and move up to a proper vpn if that became limiting.

It also might be time to start looking at a service discovery solution like Consul if you haven't already. It can help you manage the addresses of your services across different environments.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.