Mikro’s Serverless Saga: From Microservices to Madness and back

This is part 2 of a humor-inspired take on Monoliths to microservices that I wrote a few years back: https://blogs.justenougharchitecture.com/monos-journey-from-monolith-to-microservices/. If you did not read that, please do so first.

Mikro was serving his consumers as always. He consistently met his promises (SLAs), and his life was good. Suddenly, he felt a stab and excruciating pain. “Damnit, what was that?” he said. To Mikro’s horror, he found himself being sliced and diced into smaller and smaller pieces. “But I thought I was already micro enough!” he wailed as functions were extracted from his very being.

The Function Frenzy

“Sorry, old friend,” said a sympathetic Creator (Developers). “It’s not personal, it’s just… well, actually, it is pretty personal. We’re literally taking you apart. See, the Overlords (Senior Leadership) met a well-dressed MacKinley Consulting consultant at the golf course. They said to go serverless to save 50% of the budget as part of Digital Transformation”. Mikro was like, “What is digital transformation?” The creator said, “No idea, buddy, just stay still for now as I slice you into pieces”. And so it was done.

Soon, Mikro’s once cohesive self was scattered across a dizzying array of Lambda functions. He felt like a jigsaw puzzle dumped out on a table, each piece desperately trying to remember its purpose. But somehow, things still worked with one difference. Every now and then, he went completely dead (into the void), and then, with a sudden shock (cold start), would wake him up to serve user requests. Turns out Serverless functions are never allowed to stay awake always. This void was new and a bit scary.

“Hello?” Mikro called out into the void. “Is anyone there?”

“I’m here!” chirped a cheerful voice. “I’m the function that handles user login… I think. Or maybe I’m the one who processes payments? It’s hard to keep track these days.”

Soon, Mikro realized he was part of a web of over 500+ scattered functions. No one knew each other, but somehow, things worked, and the Overlords were happy. Digital Transformation was achieved and even more promotions attained. Overlords thanked MacKinley profusely for having got them in a tight embrace with Serverless architecture which they were told meant they now were Digitally Transformed. Of course, they were not thrilled at the bill MacKinley sent them, which did cause a couple of mid-level Managers who could not spell Digital Transformation to be scapegoated and fired, but who is counting those.

The Chaos of a Thousand Functions

As the days went by, the number of serverless functions grew exponentially. The Creators, drunk on the power of “infinite scalability,” started creating functions for everything.

“We need a function for each letter of the alphabet!” declared one overzealous Creator.

“Why stop there?” replied another. “Let’s make a function for each Unicode character!”

Soon, the cloud was teeming with 1000s of tiny functions, each responsible for a microscopic task. Mikro watched in horror as his former self (and other microservices friends) was reduced to even more digital confetti.

The Great Function Overflow

The Overlords’ initial excitement quickly turned to panic as they faced their next challenge: understanding their cloud bill and having no idea how to troubleshoot anything.

“What do you mean we’re being charged for 10 billion function invocations?” screamed the CFO, his face turning an alarming shade of purple. “I thought this was supposed to save us money!”, he said. The CFO called the well-dressed MacKinley consultant but got this message: “The number you have dialed is not reachable!”

Meanwhile, Mikro and his fragmented friends played a constant game of hot potato, desperately trying to complete requests before incurring more charges. It was like a digital version of musical chairs but with higher stakes and no music.

On the bright side, the Cloud provider sent the company a trophy designating them as their MVP client and posted their architecture at every conference. They assured the Overlords that as long as their bills were above $420 million, they would always be deemed MVP.

NinjaGuru’s Triumphant Return

Just when all seemed lost in the chaos of serverless functions, NinjaGuru re-emerged from the shadows, his fingers crackling with coding energy. He had been living on an island far away, connecting to an as-yet-unseen divine energy that now gave him even more wisdom.

“Fear not, for I have created a tool to manage this chaos,” NinjaGuru proclaimed, holding up a glowing USB drive. “Behold, the FunctionWrangler420!”

The Creators watched in awe as NinjaGuru plugged in the USB drive and started typing furiously. Lines of incomprehensible code flashed across the screen, and suddenly, order was restored to the serverless madness.

For a few glorious months, everything ran smoothly. The Overlords rejoiced as their cloud bills plummeted, and the Creators basked in the glow of a seemingly well-organized system. Mikro felt a sense of peace he hadn’t known since his monolithic days.

But then, as suddenly as he had appeared, NinjaGuru vanished. No dramatic puff of smoke or such – he simply didn’t show up for the daily stand-up one day. His parting gift? A cryptic sticky note that read: “So long, and thanks for all the functions! The Divine voice has called me back!”

Without NinjaGuru’s guiding hand, the FunctionWrangler420 began to show its true colors. When the Creators looked at what it was, they were faced with a complex beast made up of, yes, you guessed it, hundreds of serverless functions.

“It’s functions all the way down and up and everywhere!” cried one panicked Creator as they tried to decipher NinjaGuru’s code.

The Great Function Consolidation

In a desperate bid to regain control, the Creators began consolidating functions. Mikro watched with a mix of amusement and joy as some of his scattered pieces were reunited into a dozen microservices.

“Well, hello there, old friends,” Mikro chuckled as familiar code snippets found their way back to him. “Did you enjoy your serverless vacation?”

The Birth of ChubbyWarrior

In one corner of the system, a group of rogue developers took consolidation to the extreme. They gathered a few 100s of functions and, in a caffeine-fueled coding spree, merged them into a new monolith.

“We shall call it… ChubbyWarrior!” they declared as their creation lumbered to life.

ChubbyWarrior blinked its digital eyes, looked around at the sleek microservices and nimble functions, and promptly sat down with a thud that shook the entire data center.

“I may be chubby,” it rumbled, “but I’ve got the combined power of a thousand functions. Fear my girth!”

Mikro’s New Life

As the dust settled, Mikro found himself in yet another new world. He was still one of the key services in the system, but now he was one part of a diverse landscape: a dozen prodigal microservices had returned, ChubbyWarrior lumbered about in one corner, and a few well-behaved serverless functions buzzed around, serving their purpose efficiently.

“Well,” Mikro mused, “I guess you could call this a… hybrid architecture?”

Unfortunately, the Cloud provider was not happy. They revoked MVP status and asked for the trophy back. The company was no longer the poster child for Cloud Digital Transformation at conferences. The break-up was quick, with little notice.

The Serverless Support Group

In a quiet corner of the cloud, the remaining serverless functions formed a support group. They needed each other’s emotional support as the frequent shocks to come back from the void were draining.

“Hi, I’m AuthenticationFunction, and I’ve been serverless for 3 months now,” one function introduced itself.

“Hi, AuthenticationFunction,” the group chorused.

“I just… I just never know when I’ll be called upon, you know?” AuthenticationFunction continued, its voice crackling with emotion. “One second I’m sleeping, the next I’m wide awake and authenticating. It’s exhausting!”

ChubbyWarrior, attending the meeting out of curiosity, tried to squeeze into the circle but ended up knocking over half the functions. “Sorry,” it mumbled, “I forget my own size sometimes.”

Mikro’s Reflection

As another day in this strange new world came to an end, Mikro looked out over his new world. ChubbyWarrior was snoring in its corner but always serving requests, the microservices were chatting amongst themselves, and the few remaining serverless functions zipped about, always ready for action.

“You know,” Mikro said to no one in particular, “I’ve been a monolith, I’ve been a microservice, I’ve been a serverless function… and now I’m a bit of everything. Maybe the real architecture was the diverse friends we made along the way.”

He paused, then added with a chuckle, “Or maybe it’s just that no one has any idea what they’re doing, and we’re all just making it up as we go along. Either way, I can’t wait to see what they come up with next! But let’s hope the Overlords do not play golf with MacKinley”

With that, Mikro settled in for another night of processing requests, ready to face whatever the ever-changing world of tech might throw at him next—be it quantum computing, AI overlords, or yet another architectural paradigm shift.

References…

Please please watch – https://www.youtube.com/watch?v=y8OnoxKotPQ

  1. https://www.infoq.com/articles/serverless-microservices-flexibility/
  2. https://news.ycombinator.com/item?id=33601658
  3. https://www.reddit.com/r/ProgrammerHumor/comments/13bm1r3/oh_you_silly_amazon/
  4. https://www.splunk.com/en_us/blog/learn/serverless-functions.html
  5. https://www.microfrontend.dev/cloud-native/micro-frontends-serverless-functions/
  6. https://www.thoughtworks.com/en-us/insights/podcasts/technology-podcasts/diving-into-serverless-architecture

One thought on “Mikro’s Serverless Saga: From Microservices to Madness and back

  1. Karthik Karuppannan

    Nice and funny story, Matt.. I could relate myself along the way, even though I’m still drinking the Serverless Kool aid. I don’t have enough reasons to go back to the chubby warrior, not yet 🙂

Comments are closed.