How do you set up a productive development environment for microservices? While the tooling and infrastructure for building traditional web applications have been highly optimized over time, the same cannot be said for microservices.
In particular, setting up a productive development environment for microservices can be considerably more complex than a traditional web application:
These external dependencies add complexity to creating and maintaining a development environment. How do you set up your service so you can code and test it productively when your service depends on other resources and services?
This article discusses the various approaches to setting up a development environment, and the tradeoffs.
Using tools like Minikube or Docker Compose, you can spin up multiple services locally. For resources like databases you use Docker images that match them:
postgresDocker image as a replacement for AWS RDS.It won’t quite match, but much of the time it will be close enough.
If you’re unable to use containers, Daniel Bryant outlines a number of other approaches for developing microservices locally with various tradeoffs.