Pitfalls of microservices
As discussed earlier, building an application with microservices has many benefits, but it's not a silver bullet by any means.
You need to be aware of these main problems you might have to deal with when coding microservices:
- Illogical splitting
- More network interactions
- Data storing and sharing
- Compatibility issues
- Testing
These issues will be covered in detail in the following sections.
Illogical splitting
The first issue of a microservice architecture is how it gets designed. There's no way a team can come up with the perfect microservice architecture on their first shot. Some microservices like the PDF generator are an obvious use case. But as soon as you deal with the business logic, there's a good chance that your code will move around before you get a good grasp of how to split things into the right set of microservices.
The design needs to mature with some try-and...