官术网_书友最值得收藏!

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 in the first shot. Some microservices like the PDF generator are an obvious use case. But as soon as you deal with the business logic, there are good chances 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-fail cycles. And adding and removing microservices can be more painful than refactoring a monolithic application.

You can mitigate this problem by avoiding splitting your app in microservices if the split is not evident.

Premature splitting is the root of all evil.

If there's any doubt that the split makes sense, keeping the code in the same app is the safe bet. It's always easier to split apart some of the code into a new microservice later than to merge back to two microservices in the same code base because the decision turned out to be wrong.

For instance, if you always have to deploy two microservices together, or if one change in a microservice impacts the data model of another one, the odds are that you did not split the application correctly, and that those two services should be reunited.

主站蜘蛛池模板: 黔西县| 桃江县| 革吉县| 奉新县| 尤溪县| 芦溪县| 清远市| 临汾市| 布尔津县| 衡南县| 六盘水市| 习水县| 德兴市| 江华| 长治县| 保定市| 阿勒泰市| 千阳县| 安国市| 长寿区| 莱西市| 西藏| 黔南| 诏安县| 松原市| 邳州市| 静安区| 西青区| 丰城市| 江都市| 乐陵市| 托克逊县| 合肥市| 白河县| 东丰县| 吴旗县| 建德市| 铁岭市| 西华县| 资阳市| 永川市|