Best Practices for Microservices
Microservices are a relatively recent development, but fortunately, there is already enough experience to look at best practices. With this, we can profit from earlier hands-on experience and avoid pitfalls to optimize microservices development.
In this chapter, we’ll examine best practices for Django microservices. By the end, you’ll know how to organize your code, document it, and control its versioning.
To achieve this, this chapter covers the following topics:
- Organizing code
- Documenting microservices
- Logging and monitoring
- Error handling
- Versioning microservices
Some best practices for error handling and monitoring have been addressed before in Chapter 5, Creating RESTful APIs for Microservices, and Chapter 6, Orchestrating Microservices With Celery and RabbitMQ, yet we mention them here to group them in a complete chapter for easy access.