Skip to contentমূল লেখায় যান

Topic 18 · Architectureটপিক 18 · Architecture

Monolith, Modular Monolith, and Microservices

Think of three ways to run a restaurant. In the first, one cook does everything in one kitchen. In the second, there is still one kitchen, but it has clear stations: one for salads, one for grills, one for desserts. In the third, each dish comes from a separate small kitchen with its own staff and its own fridge. The three ways are a monolith, a modular monolith, and microservices. Each fits a different stage of a product.

6 min read6 মিনিটে পড়া যায় · 6 sections6টি সেকশন · 6 sources6টি সোর্স · updated Oct 2026আপডেট: Oct 2026

Three ways to split an LMSএকটা LMS ভাগ করার তিনটা উপায়

Slide from monolith to microservices and watch deploy units, network calls, and things to monitor change.মনোলিথ থেকে মাইক্রোসার্ভিসে স্লাইড করুন আর দেখুন ডিপ্লয় ইউনিট, নেটওয়ার্ক কল ও নজরে রাখার জিনিস কীভাবে বদলায়।

3 min3 মিনিট7 steps7টি ধাপ
  • Deploy unitsডিপ্লয় ইউনিট1
  • Network callsনেটওয়ার্ক কল0
  • To monitorনজরে রাখার1
1studentশিক্ষার্থীLMSএলএমএসone code base, one unitএকটা কোড বেস, একটা ইউনিটDBডিবি

You’ll learnআপনি শিখবেন

  • What a deploy unit isডিপ্লয় ইউনিট কী✓
  • How modules differ from servicesমডিউল আর সার্ভিসের তফাত
  • Why each split adds a network callপ্রতিটা ভাগে কেন নেটওয়ার্ক কল বাড়ে
  • Why a saga needs an undo stepsaga-র কেন আনডু ধাপ লাগে
  • Why a shared database couples servicesশেয়ার্ড ডেটাবেস কেন সার্ভিস বাঁধে

In plain words

A monolith is one application with one code base that does many business jobs Source 2সোর্স 2. You build it, test it, and deploy it as one unit Source 2সোর্স 2. A monolith is easy to start, because it needs little planning up front Source 2সোর্স 2. It is also simpler to deploy than microservices Source 2সোর্স 2.

A monolith has limits as it grows. A small change in one part can affect many other parts, and the team must retest and redeploy the whole system Source 2সোর্স 2. To scale it, you must scale the whole application, even if only one part is busy Source 2সোর্স 2.

The vendor docs give no one definition of a modular monolith. In this tutorial, a modular monolith is still one application that you deploy as one unit. But inside, the code is split into clear modules, such as user, course, payment, and notification. Each module has its own area of the code and talks to other modules through a clear interface. AWS says that if you start with a monolith, you must make sure it is modular, so it can later grow into smaller services Source 3সোর্স 3. Clear borders between parts let you move each part out on its own later Source 6সোর্স 6.

Microservices are small, independent services. A small team can build and run each one, and each one can be deployed without redeploying the rest Source 1সোর্স 1. Each service owns its own data Source 1সোর্স 1. Each service can also be scaled on its own Source 1সোর্স 1.

Two panels side by side. Left, the modular monolith: one application box with four modules under it, user, course, payment, and notification. Right, microservices: four separate services, user, course, payment, and notification, each with an arrow to its own database.Open the image in full sizeছবিটি পূর্ণ আকারে খুলুন

Microservices do not remove complexity. AWS says they reveal the complexity that is already there Source 2সোর্স 2. Each service is simpler, but the whole system has more moving parts Source 1সোর্স 1. Smaller services can add latency (waiting time), harder debugging, and more operations work Source 3সোর্স 3.

সহজ English

A monolith is one application with one code base that does many business jobs. You build, test, and deploy it as one unit. It is easy to start and simpler to deploy than microservices Source 2সোর্স 2.

As a monolith grows, one small change can affect many parts, and the team must retest and redeploy the whole system. To scale it, you must scale the whole application, also when only one part is busy Source 2সোর্স 2.

A modular monolith is still one application that you deploy as one unit. Inside, the code is split into clear modules. This is the tutorial's own meaning. AWS says that if you start with a monolith, you must make it modular, so it can later grow into smaller services Source 3সোর্স 3.

Microservices are small, independent services. A small team can build, run, and deploy each one without redeploying the rest. Each service owns its own data and can scale on its own Source 1সোর্স 1. The whole system has more moving parts Source 1সোর্স 1. Smaller services can add latency (waiting time), harder debugging, and more operations work Source 3সোর্স 3.

বাংলা ব্যাখ্যা

Monolith হলো একটি code base-সহ একটি application, যা অনেক business কাজ করে Source 2সোর্স 2। আপনি এটিকে একটি unit হিসেবে build, test এবং deploy করেন Source 2সোর্স 2। শুরুতে খুব বেশি পরিকল্পনা লাগে না, তাই monolith দিয়ে শুরু করা সহজ Source 2সোর্স 2। Microservices-এর চেয়ে এটি deploy করাও সহজ Source 2সোর্স 2।

Monolith বড় হলে কিছু সীমাবদ্ধতা দেখা দেয়। একটি অংশের ছোট পরিবর্তন অন্য অনেক অংশে প্রভাব ফেলতে পারে, তখন team-কে পুরো system আবার test এবং redeploy করতে হয় Source 2সোর্স 2। Scale করতে হলে পুরো application scale করতে হয়, এমনকি যদি শুধু একটি অংশ ব্যস্ত থাকে Source 2সোর্স 2।

Vendor docs-এ modular monolith-এর একক কোনো সংজ্ঞা নেই। এই tutorial-এ modular monolith মানে এমন একটি application, যা এখনো একটি unit হিসেবে deploy হয়, কিন্তু ভেতরে code স্পষ্ট module-এ ভাগ করা, যেমন user, course, payment এবং notification। প্রতিটি module একটি স্পষ্ট interface দিয়ে অন্য module-এর সাথে কথা বলে। AWS বলে, monolith দিয়ে শুরু করলে সেটিকে modular করতে হবে, যাতে পরে ছোট service-এ ভাগ করা যায় Source 3সোর্স 3।

Microservices হলো ছোট, স্বাধীন service। একটি ছোট team প্রতিটি service build এবং চালাতে পারে, আর বাকিগুলো redeploy না করেই প্রতিটি deploy করা যায় Source 1সোর্স 1। প্রতিটি service-এর নিজস্ব data থাকে এবং এটি আলাদাভাবে scale করা যায় Source 1সোর্স 1।

তবে microservices জটিলতা দূর করে না। AWS বলে, এরা আগে থেকে থাকা জটিলতাকে সামনে আনে Source 2সোর্স 2। প্রতিটি service সহজ হলেও পুরো system-এ চলমান অংশ বেশি থাকে Source 1সোর্স 1। ছোট service-গুলো latency (অপেক্ষার সময়), কঠিন debugging এবং বেশি operations কাজ যোগ করতে পারে Source 3সোর্স 3।

When you need it

Tutorial view and the AWS view

The lists below are the tutorial's own advice. In the tutorial's view, a monolith is often the best start for a new product. AWS Well-Architected is stricter. It says that a monolithic architecture "should be avoided whenever possible" Source 3সোর্স 3. It also says that if you start with a monolith, it must be modular, so it can later move to smaller services Source 3সোর্স 3.

Choose a monolith when:

  • The team is small and the product is new.
  • Traffic is low or moderate.
  • The team must change things fast.

AWS says a monolith suits a simple application or a prototype Source 2সোর্স 2.

Choose a modular monolith when:

  • The code base grows and the team grows.
  • You want clear borders inside the code, but not the cost of microservices yet.

Choose microservices when:

  • The borders between business areas are clear.
  • Parts of the system must scale or deploy on their own.
  • The team has the skills. Microsoft says to check this with care Source 1সোর্স 1.
  • DevOps, monitoring, and tracing are ready. Microservices need a mature DevOps culture Source 1সোর্স 1.

সহজ English

The lists in this section are the tutorial's own advice. In the tutorial's view, a monolith is often the best start for a new product. AWS Well-Architected is stricter. It says that a monolithic architecture "should be avoided whenever possible" Source 3সোর্স 3. It also says that if you start with a monolith, it must be modular Source 3সোর্স 3.

Choose a monolith when:

  • The team is small and the product is new.
  • Traffic is low or moderate.
  • The team must change things fast.

AWS says a monolith suits a simple application or a prototype Source 2সোর্স 2.

Choose a modular monolith when the code base and the team grow, and you want clear borders inside the code, but not the cost of microservices yet.

Choose microservices when:

  • The borders between business areas are clear.
  • Parts of the system must scale or deploy on their own.
  • The team has the skills. Microsoft says to check this with care Source 1সোর্স 1.
  • DevOps, monitoring, and tracing are ready. Microservices need a mature DevOps culture Source 1সোর্স 1.

বাংলা ব্যাখ্যা

এই অংশের তালিকাগুলো tutorial-এর নিজস্ব পরামর্শ। Tutorial-এর মতে, নতুন product-এর জন্য monolith প্রায়ই সবচেয়ে ভালো শুরু। AWS Well-Architected আরও কঠোর। এটি বলে, monolithic architecture "should be avoided whenever possible" Source 3সোর্স 3। এটি আরও বলে, monolith দিয়ে শুরু করলে সেটিকে modular হতে হবে, যাতে পরে ছোট service-এ যাওয়া যায় Source 3সোর্স 3।

Monolith বেছে নিন, যখন:

  • Team ছোট এবং product নতুন।
  • Traffic কম বা মাঝারি।
  • Team-কে দ্রুত পরিবর্তন করতে হয়।

AWS বলে, monolith একটি সহজ application বা prototype-এর জন্য উপযুক্ত Source 2সোর্স 2।

Modular monolith বেছে নিন, যখন code base এবং team বড় হচ্ছে, আর আপনি code-এর ভেতরে স্পষ্ট সীমানা চান, কিন্তু এখনই microservices-এর খরচ চান না।

Microservices বেছে নিন, যখন:

  • Business area-গুলোর মধ্যে সীমানা স্পষ্ট।
  • System-এর কিছু অংশকে আলাদাভাবে scale বা deploy করতে হয়।
  • Team-এর দক্ষতা আছে। Microsoft বলে, এটি সাবধানে যাচাই করুন Source 1সোর্স 1।
  • DevOps, monitoring এবং tracing প্রস্তুত। Microservices-এর জন্য একটি পরিণত DevOps culture দরকার Source 1সোর্স 1।

A real-life example

An LMS (learning management system) starts as a monolith. One team builds sign-up, courses, payment, and notifications in one app. This is fast and cheap.

Later, the team moves some parts out:

  • Notification becomes a separate service. Email and SMS work runs in the background and does not depend on the rest.
  • Payment becomes a separate service. It must be very reliable and very secure, so it gets its own team, tests, and release plan.
  • Certificate and video processing become separate services. They are heavy, CPU-bound background jobs that need to scale on their own.

The course catalog and the student profile stay in the modular monolith. Microsoft describes this step-by-step move as the Strangler Fig pattern: you replace one piece of the old system at a time Source 6সোর্স 6.

সহজ English

An LMS (learning management system) starts as a monolith. One team builds sign-up, courses, payment, and notifications in one app. This is fast and cheap.

Later, the team moves some parts out into separate services:

  • Notification. Email and SMS work runs in the background and does not depend on the rest.
  • Payment. It must be very reliable and very secure. So it gets its own team, tests, and release plan.
  • Certificate and video processing. These are heavy, CPU-bound background jobs. They must scale on their own.

The course catalog and the student profile stay in the modular monolith. Microsoft calls this step-by-step move the Strangler Fig pattern. You replace one piece of the old system at a time Source 6সোর্স 6.

বাংলা ব্যাখ্যা

একটি LMS (learning management system) monolith হিসেবে শুরু হয়। একটি team একটি app-এর মধ্যেই sign-up, course, payment এবং notification তৈরি করে। এটি দ্রুত এবং কম খরচের।

পরে team কিছু অংশ আলাদা service-এ সরিয়ে নেয়:

  • Notification। Email এবং SMS-এর কাজ background-এ চলে এবং বাকি অংশের ওপর নির্ভর করে না।
  • Payment। এটিকে খুব নির্ভরযোগ্য এবং খুব নিরাপদ হতে হয়, তাই এটি নিজস্ব team, test এবং release plan পায়।
  • Certificate এবং video processing। এগুলো ভারী, CPU-bound background job, যেগুলোকে আলাদাভাবে scale করতে হয়।

Course catalog এবং student profile modular monolith-এই থেকে যায়। Microsoft এই ধাপে ধাপে সরানোকে Strangler Fig pattern বলে: আপনি পুরোনো system-এর একটি করে অংশ বদলান Source 6সোর্স 6।

Common mistakes

  • Too many services too early. A small team with small traffic gets all the cost of microservices and few of the gains.
  • One shared database, called "microservices". Shared database schemas couple the services together Source 1সোর্স 1.
  • No monitoring or tracing. A request now crosses many services. Microsoft says logs must be correlated across services, and that you need central logs, distributed tracing, and metrics Source 1সোর্স 1.
  • Services split by technical layer. A "database service" and a "UI service" are layers, not business areas. Microsoft says to design services around business capabilities, not layers Source 4সোর্স 4.
  • Ignoring distributed transactions. When one change touches many services, it is unlikely to be one ACID transaction (atomic, consistent, isolated, and durable) Source 1সোর্স 1. A common answer is a saga: a chain of local steps, with "undo" steps if a later step fails Source 5সোর্স 5.
  • A "Death Star". If services depend on each other too much, one failure spreads, and the system is as fragile as a monolith Source 3সোর্স 3.

সহজ English

Look out for these common mistakes:

  • Too many services too early. A small team with small traffic gets all the cost of microservices and few of the gains.
  • One shared database, called "microservices". When services share database schemas, the services are coupled together Source 1সোর্স 1.
  • No monitoring or tracing. A request now crosses many services. Microsoft says that you must correlate the logs across services. You need central logs, distributed tracing, and metrics Source 1সোর্স 1.
  • Services split by technical layer. A "database service" and a "UI service" are layers, not business areas. Microsoft says to design services around business capabilities, not layers Source 4সোর্স 4.
  • No plan for distributed transactions. When one change touches many services, it is unlikely to be one ACID transaction Source 1সোর্স 1. A common answer is a saga: a chain of local steps, with "undo" steps if a later step fails Source 5সোর্স 5.
  • A "Death Star". If services depend on each other too much, one failure spreads. Then the system is as fragile as a monolith Source 3সোর্স 3.

বাংলা ব্যাখ্যা

এই সাধারণ ভুলগুলোর দিকে খেয়াল রাখুন:

  • খুব তাড়াতাড়ি খুব বেশি service। কম traffic-এর একটি ছোট team microservices-এর পুরো খরচ পায়, কিন্তু সুবিধা পায় সামান্য।
  • একটি shared database, যাকে "microservices" বলা হয়। Shared database schema service-গুলোকে একে অপরের সাথে বেঁধে ফেলে (coupling) Source 1সোর্স 1।
  • Monitoring বা tracing নেই। এখন একটি request অনেক service পার হয়। Microsoft বলে, service জুড়ে log correlate করতে হবে, এবং আপনার central log, distributed tracing এবং metrics দরকার Source 1সোর্স 1।
  • Technical layer অনুযায়ী service ভাগ করা। একটি "database service" আর একটি "UI service" হলো layer, business area নয়। Microsoft বলে, service design করুন business capability ঘিরে, layer ঘিরে নয় Source 4সোর্স 4।
  • Distributed transaction উপেক্ষা করা। একটি পরিবর্তন অনেক service ছুঁয়ে গেলে সেটি একটি ACID transaction (atomic, consistent, isolated এবং durable) হওয়ার সম্ভাবনা কম Source 1সোর্স 1। একটি সাধারণ সমাধান হলো saga: local ধাপের একটি শৃঙ্খল, যেখানে পরের কোনো ধাপ fail করলে "undo" ধাপ চলে Source 5সোর্স 5।
  • একটি "Death Star"। Service-গুলো একে অপরের ওপর খুব বেশি নির্ভর করলে একটি failure ছড়িয়ে পড়ে, এবং system একটি monolith-এর মতোই ভঙ্গুর হয়ে যায় Source 3সোর্স 3।

What a tester can check

Tutorial advice

These test ideas are the tutorial's own advice.

  • Contract tests. When a module becomes a service, test the API between them. Check that both sides agree on fields, types, and error codes.
  • Partial failure. Stop one service, such as notification. Check that payment and enrollment still work, and that the missed messages go out later.
  • Data across services. Pay for a course, then fail the enrollment step. Check that the system undoes the payment or retries the enrollment, and never leaves the student charged but not enrolled.
  • One request, one trace. Follow one checkout through all services with one request ID. Check that each log line has that ID.
  • Independent deploys. Deploy a new version of one service. Run the end-to-end flows and check that the other services still work with it.

সহজ English

These test ideas are the tutorial's own advice.

  • Contract tests. When a module becomes a service, test the API between them. Make sure that both sides agree on fields, types, and error codes.
  • Partial failure. Stop one service, such as notification. Make sure that payment and enrollment still work. Make sure that the missed messages go out later.
  • Data across services. Pay for a course, then make the enrollment step fail. Make sure that the system undoes the payment or tries the enrollment again. The student must never be charged but not enrolled.
  • One request, one trace. Follow one checkout through all services with one request ID. Make sure that each log line has that ID.
  • Independent deploys. Deploy a new version of one service. Run the end-to-end flows. Make sure that the other services still work with it.

বাংলা ব্যাখ্যা

নিচের test ধারণাগুলো এই tutorial-এর নিজস্ব পরামর্শ।

  • Contract test। একটি module যখন service হয়ে যায়, তখন দুই পাশের মধ্যকার API test করুন। দেখুন, field, type এবং error code নিয়ে দুই পাশ একমত কি না।
  • আংশিক failure। একটি service বন্ধ করুন, যেমন notification। দেখুন, payment এবং enrollment তবুও কাজ করে কি না, আর বাদ পড়া message-গুলো পরে যায় কি না।
  • Service-গুলোর মধ্যে data। একটি course-এর জন্য pay করুন, তারপর enrollment ধাপটি fail করান। দেখুন, system payment undo করে বা enrollment আবার চেষ্টা করে কি না। শিক্ষার্থীর টাকা কাটা হয়েছে কিন্তু enroll হয়নি, এমন অবস্থা যেন কখনো না হয়।
  • একটি request, একটি trace। একটি request ID দিয়ে একটি checkout-কে সব service-এর মধ্য দিয়ে অনুসরণ করুন। দেখুন, প্রতিটি log line-এ সেই ID আছে কি না।
  • স্বাধীন deploy। একটি service-এর নতুন version deploy করুন। End-to-end flow-গুলো চালান এবং দেখুন, অন্য service-গুলো তার সাথে তবুও কাজ করে কি না।

Key words

WordMeaning
MonolithOne application with one code base, deployed as one unit
Modular monolithOne deployed application, split inside into modules with clear borders
MicroserviceA small service that a small team owns, deploys on its own, and that owns its own data
Code baseAll the source code of one application
DeployPut a new version of the software into use
Business capabilityA thing that the business does, such as payment or enrollment
ACID transactionA database change that is atomic (it happens fully or not at all), consistent, isolated, and durable
SagaA chain of local steps across services, with undo steps if one step fails
Strangler Fig patternReplace an old system one piece at a time
LatencyThe time that a request waits for an answer

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    Microservices architecture style

    Microsoft Azure Architecture Center · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  2. [2]
    What's the Difference Between Monolithic and Microservices Architecture?

    AWS · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  3. [3]
    REL03-BP01 Choose how to segment your workload

    AWS Well-Architected Framework · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  4. [4]
    Use domain analysis to model microservices

    Microsoft Azure Architecture Center · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  5. [5]
    Saga distributed transactions pattern

    Microsoft Azure Architecture Center · accessed 2026-10-20দেখা হয়েছে: 2026-10-20

  6. [6]
    Strangler Fig pattern

    Microsoft Azure Architecture Center · accessed 2026-10-20দেখা হয়েছে: 2026-10-20