Taking Microservices too far
Microservice, debated, misused and over played. I admittedly am guilty. We all are. The new hotness comes and like children we wielded it like a lightsaber at a Disney theme park. Telling everyone they need to do the same thing. Now I am not against microservices. I am more so for the right solution for the problem. When cloud ramped up we got lost in this new architecture. Espoused about it and wanted everyone to do it.
This reminds me of a conversation I had with my doctor last year. But to put it in to context I am going to have to go off topic and explain what happened. So bear with me and I am sorry for getting personal.
Early last year, I had high cholesterol. Doc said I needed to exercise, and I said I did what I could when I traveled. When I was actually home, I lifted weights. But I needed cardio and I wasn’t doing it. So like anything, I jumped in full force and did cardio. Jumped on my wife’s Peloton, hit my Trek bike if it wasn’t raining. I took it to an extreme. And what I didn’t do was weight training. What I heard was “cardio only do it now”, but what he wanted was a balance. About midway through the year, I had a dizzy spell after mowing the lawn. I passed out and slammed my head into my car. First concussion in my life.
Turns out it was caused by a lack of blood flow to the brain. My posture was shit. My upper body strength was gone. My hunchback was the problem. Now my diet and excessive traveling had a role in this for sure. But the answer was I needed to start lifting weights again. Start standing up straight and stop hunching over my laptop. Everything my new physical therapist told me to do. Who I grew fond over yelling at me to get me back in shape. She would yell at me in her Filipino accent calling me an “old woman”.
The point of the story was just because I needed cardio, doesn’t mean I should have given up on lifting weights. Just because you are in the cloud doesn’t mean microservices is going to solve all your problems. Just like cardio didn’t solve all of mine. In fact, just doing microservice makes things worse for some projects.
Microservice architecture is great for some situations. But in others a fit-monolith is better suited. Don’t be afraid to jump in and say so. Is your proposed architecture there to solve your problem or build someone’s resume for their next job? By no means am I saying we should forego any modernization. Most monoliths out there could and should be trimmed down. Code cleaned up. Some better testing around it. Put some automation around it. Starting a new project? Sure, you can use some of the same great principles but in a monolith, or a fit-monolith.