What are Microservices?

What are Microservices?

Everyone's talking about Microservices, but what exactly are they? Are they just a set of functions hosted over a network or something more?

Microservices in simple terms are like the regular functions from our programming language but just a more extensive set of responsibilities and served via a network.

So, you may have a microservice that handles everything related to Payments, a service that handles Notifications, and a service that deals with analytics. We see each service having focussed responsibility.

Microservices are no silver bullet, and they would not magically solve all the problems you have. It has its own fair share of drawbacks.

Monolith

Almost all products start monolith where every feature is put into a single codebase which is deployed as one artifact across all the servers. For example, the code handling payments, notifications, and analytics are all part of the same codebase deployed within the same binary.

Monoliths are always simple to build, develop, test, and scale. Given their simplicity, they are the go-to option for anyone starting up. With a lean team working on monolith would ensure very quick feature delivery.

Disadvantages of Monolith

  • monolith is tightly coupled
  • the deployment artifact - binary/JAR is bulky
  • the tech stack is homogeneous
  • bug in one module affects other modules
  • scaling one module requires scaling everything
  • large monolithic codebase is intimidating and it slows down delivery

Monolith to Microservices

Migrating from monolith to microservices is a slow process and to start you would club a related set of functions and fork out a service out of it. The process would be repeated for other sets of functions, eventually breaking the entire monolith.

Characteristics of Microservices

  • microservices are autonomous
  • microservices are focused and specialized
  • microservices are built around a business usecase/need

Advantages of Microservices

  • agility: small independent teams can move much faster
  • scaling: you can precisely scale one service as per the load
  • freedom: you can pick the best-suited tech stack for the service
  • given the scope is focused, a microservice is simple to understand
  • microservices can be reused across the platform
  • if a service goes down, it is easy to isolate it using a circuit breaker

Anti-patterns

  • do not start with microservices; start with a monolith
  • do not make services too small; they should a larger responsibility
  • don't reinvent the wheel, use existing tooling as much as possible

Here's the video of my explaining this in-depth ?? do check it out

Everyone is doing Microservices, but what are they after all? From a distance, it looks like a function put over the network. Is it really just that? There are so many things to explore about microservices, so let me introduce you to this world today.

In this video, we talk about what are microservices, understand how it starts with a simple monolith and eventually evolve into microservices, look at their key characteristics, understand their advantages, and conclude with some anti-patterns that we all should keep in mind to ensure we do not do it wrong.

Outline:

  • 00:00 Agenda
  • 02:38 Idea of a Microservice
  • 09:26 Monolith Architecture
  • 16:19 Monolith to Microservice
  • 18:49 Characteristics of a Microservice
  • 21:09 Advantages of Microservices
  • 24:06 Anti-patterns in Microservices

You can also


Thank you so much for reading ?? If you found this helpful, do spread the word about it on social media; it would mean the world to me.

You can also follow me on your favourite social media LinkedIn, and Twitter.

Yours truly,

Arpit

arpitbhayani.me

Until next time, stay awesome :)

No alt text provided for this image

I teach a course on System Design where you'll learn how to intuitively design scalable systems. The course will help you

  • become a better engineer
  • ace your technical discussions
  • get you acquainted with a massive spectrum of topics ranging from Storage Engines, High-throughput systems, to super-clever algorithms behind them.

I have compressed my ~10 years of work experience into this course, and aim to accelerate your engineering growth 100x. To date, the course is trusted by 600+ engineers from 10 different countries and here you can find what they say about the course.

Together, we will build some of the most amazing systems and dissect them to understand the intricate details. You can find the week-by-week curriculum and topics, benefits, testimonials, and other information here https://arpitbhayani.me/masterclass.

Hi Arpit Bhayani nice video :) What do You think about microservice problem domain, what is Your methodology and techniques when defining/framing problem domain for concrete microservice ? (I refer to project business and functional requirements) Best, Igor.

回复
Rahul Mutreja

Software Engineer at Nagarro

2 年

Haven't you already covered microservices in a previous newsletter/essay of yours?

回复
Ashish Vijaywargiya

VP of Operations at HotWax Systems | Apache OFBiz Committer, PMC Member | ASF(Apache Software Foundation) Member | Empowering College Students, Freshers & Early IT Professionals ??

2 年

Good one, Arpit!!

Venugopal Reddy

iOS Developer at NTT Data | Ex - Bosch,OpenText | NIE'19

2 年

Nice article!

More about me: arpitbhayani.me Newsletter: arpitbhayani.me/newsletter Subscribe #AsliEngineering for such in-depth engineering concepts: https://www.youtube.com/c/ArpitBhayani Intermediate-Level System Design course: arpitbhayani.me/masterclass Beginner-friendly System Design course: https://www.school-of-programming.com Free course on microservices: https://courses.arpitbhayani.me/designing-microservices All GtiHub Outages: https://courses.arpitbhayani.me/github-outage-dissections/

回复

要查看或添加评论,请登录

Arpit Bhayani的更多文章

  • How to Find and Ride the Next Tech Wave

    How to Find and Ride the Next Tech Wave

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    6 条评论
  • Engineer or Manager? How to Decide Your Path

    Engineer or Manager? How to Decide Your Path

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    5 条评论
  • One Career Bet Worth Taking

    One Career Bet Worth Taking

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    5 条评论
  • Leave your job with grace and gratitude

    Leave your job with grace and gratitude

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    7 条评论
  • Turn Boring Projects into Opportunities

    Turn Boring Projects into Opportunities

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    1 条评论
  • When is the right time to switch?

    When is the right time to switch?

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    8 条评论
  • Ramping up faster in your new job

    Ramping up faster in your new job

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    4 条评论
  • Back Your Disagreement with Data

    Back Your Disagreement with Data

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    2 条评论
  • Doubt yourself every day

    Doubt yourself every day

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    9 条评论
  • Not everything needs to be dumbed down

    Not everything needs to be dumbed down

    This edition of the newsletter contains one quick write-up that will help you grow faster in your career a video I…

    11 条评论

社区洞察

其他会员也浏览了