The post has been translated automatically. Original language: Russian
To display one page, our app requested data from three microservices. A single team built the entire app.
In my previous post about Metabase, I wrote about the extra work involved in gathering data from multiple services for a single report. We had to do the same thing just to load a page.
I split the app into four microservices so we could build a version of the product with the features each customer needed. In practice, even a small change often affected several services. We had to coordinate changes across them and test how they worked together.
Eventually, we merged the services into a modular monolith. We moved the tables into one database and linked data that had previously been stored separately. After that, the app could get all the data for the page from one database.
Today, before splitting out a service, I’d ask myself which team needs to develop this part of the product independently. When several teams work on a large application, separate services let each team own its part of the product and release changes on its own schedule.
In our case, one small team developed the entire product. Each customer needed a different set of features. If I were starting the project today, I’d build the product as a single application and choose which modules to include for each customer.
#Microservices #ModularMonolith #SoftwareArchitecture #EngineeringTeams
Чтобы показать одну из страниц, приложение запрашивало данные у трёх микросервисов. Всё приложение разрабатывала одна команда.
В прошлом посте про Metabase я писал, сколько работы добавляет сбор данных из нескольких сервисов для одного отчёта. У нас с этим приходилось иметь дело даже при открытии обычной страницы.
Я разделил приложение на четыре микросервиса, чтобы собирать для каждого заказчика продукт с нужным набором функций. На практике даже небольшая правка часто затрагивала несколько сервисов. Нам приходилось согласовывать изменения и проверять, как сервисы работают вместе.
В итоге мы объединили сервисы в модульный монолит. Перенесли таблицы в одну базу и связали данные, которые раньше хранились отдельно. После этого приложение получало все данные для страницы из одной базы.
Сегодня, прежде чем выделить сервис, я бы спросил себя, какой команде нужно развивать эту часть продукта самостоятельно. Когда над большим приложением работают несколько команд, отдельные сервисы помогают каждой отвечать за свою часть продукта и выпускать изменения по своему графику.
У нас весь продукт развивала одна небольшая команда. Разница была в том, какой набор функций требовался каждому заказчику. Если бы я начинал этот проект сегодня, я бы собрал продукт из модулей внутри одного приложения и подбирал их состав под заказчика.
Comments 0
Newest Popular