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

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.

主站蜘蛛池模板: 鞍山市| 朝阳市| 贵港市| 娱乐| 长宁县| 永善县| 崇左市| 普宁市| 贵定县| 潢川县| 清苑县| 乳源| 会泽县| 新野县| 鄄城县| 咸阳市| 淄博市| 壶关县| 万州区| 三门县| 泽库县| 龙门县| 临泉县| 石河子市| 稻城县| 安龙县| 冀州市| 漳浦县| 华池县| 漳浦县| 祁连县| 巴林右旗| 大足县| 武乡县| 林口县| 沂源县| 南充市| 定边县| 晋城| 出国| 广河县|