Microservice architecture vs monolith (using a simple example)

Microservice architecture is a concept that has been around for quite some time, but many still do not fully understand what it is, what pros and cons it has compared to monolithic architecture. In my opinion, this needs to be understood, even by non-technical specialists. Once, during one of the interviews for a “product” position at a large international company, the recruiter asked me to explain the difference between them and list the advantages and disadvantages of each approach.
This article is unlikely to provide anything new to experienced professionals, although they may find it useful as an example to explain to newbies. However, it can be useful for non-technical specialists – using a simple everyday example, I will show how both approaches work and why one is better than the other.

Monolith – all-in-one TV, but with nuances

I have a smart Samsung TV, it’s already 6 years old. This is a classic example of a monolith: everything is built into one device – sound, video, and “brains” (smart firmware). Everything is convenient and simple, controlled from one remote control.

Monolith

Monolith

Over time, the TV became outdated: applications began to work slowly, some stopped launching, and the sound began to act up. If you start the built-in operating system, after a short time it begins to constantly reboot.

To continue using it, you could send it for repair, which would cost a lot of money and time, the sound would become better, it would stop loading, but the built-in applications could no longer be updated, no one supports them anymore. As is often the case with monoliths, upgrading is impossible: you either upgrade everything or nothing. Another option is to buy a completely new one to replace it. Buying a new TV was not part of my plans; I was completely satisfied with the picture quality, and I didn’t want to lose a large amount of money at once.

Migrating to Microservices: Flexibility and Opportunity

Instead of throwing out the old TV and buying a new one, I went a different route. I began to gradually update it by connecting new devices – and this is an excellent example of the transition to a microservice architecture.

First step — connected a set-top box from Xiaomi, that is, installed new “brains”. Now all modern applications began to work quickly and without problems. The upgrade was almost invisible, it was necessary to connect a few wires, and voila, one of its key functions was replaced.

New "brain"

New “brains”

Second step — my old sound has completely given up. Repair built-in speakers? Expensive and inconvenient, the TV doesn’t fit in my car, so taking it for repairs is a separate adventure. Instead, I first connected an existing simple speaker, and the result was an MVP of the “sound” microservice.

Microservice MVP "sound"

MVP of microservice “sound”

A little later, I switched to the “target” microservice and connected a new JBL soundbar, which was a gift from my colleagues.

Target solution

Target solution

The sound quality has become several orders of magnitude higher, without the need to replace the TV. Not every modern TV can boast of such sound.

Benefits of the Microservices Approach

This approach – essentially an example of microservice architecture – has a number of undeniable advantages:

  1. Flexibility. When individual components become obsolete or break down, there is no need to change the entire system. You can simply update one of the services. As in my case: first I replaced the “brains” with a console, and then connected a soundbar for sound.

  2. Saving. Instead of spending money on a new TV (monolithic), I was able to upgrade the old one in stages. This turned out to be cheaper and allowed us to avoid large investments.

  3. Multifunctionality. My new set-top box works not only with this TV. I can take it on a trip, connect it to another TV or monitor. The soundbar also turned out to be universal – it can be used as a separate speaker for music. That is, the same “microservices” can be used in other “services”.

But there are also disadvantages…

Like any approach, microservice architecture has its drawbacks. For example, now I have three remote controls at home: one for the TV, another for the set-top box, and a third for the soundbar. At first, the children were confused and didn’t understand why the sound wasn’t working or the channel wasn’t changing. In microservices, too, the more individual components, the more it is more difficult to synchronize and manage them.

Control difficulties

Control difficulties

Another disadvantage is the possible difficulties with integration. Sometimes different devices may not “talk” to each other perfectly. For example, the console remote control does not always work correctly with TV or sound, and you need to manually switch modes. My soundbar lay in the box for a long time; I didn’t want to waste time connecting it, and no one else at home could do this except me.

Conclusion

Microservice architecture is an opportunity to be flexible and update only those parts of the system that are outdated or require improvements. Instead of rewriting or replacing the entire product each time, you can replace only individual parts of it. Yes, this adds a little complexity to management, but it gives freedom and saves resources.

So if your business (or TV) is starting to flounder, maybe it's time to think about microservices – little by little, step by step, you'll make it modern and flexible without breaking the whole system at once.

ps liked the post, come to my tg channel Inspired Product Manager.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *