Book 7 · Volume II — Application Architecture Styles & Patterns · Topic 1.4
Monolith Limitations
Scaling, deployment coupling and technology coupling
9 min readStage 3 · Systems8 interview questions
Written byMaheshFounder · Senior Technical Architect
Chapter
Chapter 1 — Monolithic Architecture
Prerequisites
Topics 1.1–1.3
You will be able to
Explain why monoliths scale as a whole, how shared deployment couples teams and releases, and how shared technology couples upgrades and choices; recognise measurable symptoms; apply mitigations within the monolith; and decide when extraction of specific modules is justified
A monolith's limitations stem from the same property as its advantages — everything is one unit. It scales as a whole, releases as a whole, and shares one technology stack.
Figure 1 — Scaling (TOC): all or nothing
TOC limitation
Definition
Scaling
Capacity is added by replicating the entire application, so modules with different load profiles cannot be scaled (or tuned) independently
Deployment coupling
All changes ship in one release; one module's defect, test failure or risky change delays or endangers all others
Technology coupling
All modules share language version, frameworks, libraries, database engine and runtime tuning; upgrades and technology choices apply to everything at once
Table 1 — The three TOC limitations
2Why It Exists
As systems and organisations grow, one unit must satisfy many competing needs: a search module needs ten times the capacity of admin screens; ten teams want to release on their own schedule; one module would benefit from a different database. The monolith forces one answer for all.
These limits are not design failures; they are the price of the simplicity that made the monolith attractive. Early on, one deployable, one database and one stack are an advantage: one pipeline, one set of upgrades and transactions across modules for free. The cost appears as the system grows along three axes at once. Load diverges, so replicating everything is no longer the cheapest way to serve the hot module. Teams multiply, so a shared release turns into a queue with coordination meetings. Domains diversify, so a single framework version or database engine fits some modules badly. This explains why the response should be measured: each limitation has mitigations inside the monolith, and extraction pays off only for modules whose divergence is large and sustained.
Figure 2 — Symptoms that limits are real
3Core Concepts
3.1 Scaling
Figure 3 — Cost to scale for a search spike (illustrative)
Scaling limitation
Detail
Whole-app replicas
Memory for all modules per pod
Shared DB bottleneck
One database serves all modules
Uniform tuning
One heap/GC config
Startup time
Slower autoscaling
Table 2 — Scaling constraints
YAML
# Mitigation inside the monolith: route read-heavy module to a replicaspring: datasource: primary: { url: jdbc:postgresql://db-primary/shop }# used by @Transactional(readOnly) replica: { url: jdbc:postgresql://db-replica/shop }
3.2 Deployment coupling
Figure 4 — Deployment coupling (TOC)
Symptom
Metric
Release trains
Deploys per week falling
Blocked fixes
Lead time for hotfixes rising
Big-bang releases
Change failure rate rising
Coordination meetings
Hours per release
Table 3 — Measuring deployment coupling
JAVA
// Mitigation: decouple deploy from release with feature flagsif (features.getBooleanValue("new-pricing-engine", false, ctx)) {return newPricing.quote(request);}return legacyPricing.quote(request);
3.3 Technology coupling
Figure 5 — Technology coupling (TOC)
Technology coupling example
Effect
Java 17 → 25 upgrade
Whole app migrates at once
Spring Boot major upgrade
Every module changes
Need graph database for recommendations
Adds to shared runtime or impossible
Conflicting library versions
Dependency hell
Table 4 — Technology coupling
4How It Works Internally — Growth Dynamics
Figure 6 — Pipeline time as the monolith grows
Size driver
Effect on limitation
More code
Longer builds/tests → deployment coupling worse
More teams
More contention for releases
More load diversity
Wasted capacity when scaling whole app
More domains
More pressure for different technologies
Table 5 — Limitations grow with size
4ADeep Dive — Mitigate or Extract?
Figure 7 — Limitations and mitigations
Question
Extract if yes
Does one module need ≥ 5× different scaling?
✔
Does one team need an independent release cadence?
✔
Does a module need a different runtime/DB?
✔
Is the module's boundary clean (API + events)?
Required first
Can the team operate a separate service?
Required
Table 6 — Extraction decision
TEXT
Strangler extraction of search (from Vol. VIII Ch 8 patterns)1. Module 'search' has clean API + consumes ProductChanged events2. Build search-svc (Spring Boot 4 + OpenSearch) fed by the same events3. Gateway routes /api/search to search-svc (canary → 100%)4. Remove search module from monolith
During a sale, search traffic grew 15×; the monolith scaled to 40 pods, mostly idle memory for other modules, and the database saturated. A search read model in OpenSearch fed by events (first inside the monolith, later extracted) cut cost by 65%.
6.2 Release train fatigue
Nine teams shared a fortnightly release; one team's failing tests blocked all. Trunk-based development with feature flags and module-scoped tests enabled daily deploys without splitting the monolith.
6.3 Worked example — scaling cost table
Option
Monthly cost
Scale whole monolith
₹10 L
Monolith + replica + cache
₹4 L
Extract search service
₹2.8 L
Table 8 — Mitigation vs extraction
6.4 Worked example — deployment coupling metrics
Metric
Value
Target
Deploys/week
0.5
≥ 5
Hotfix lead time
4 days
< 1 day
Table 9 — Quantify before deciding
6.5 Worked example — technology upgrade plan
Step
Tool
Upgrade Java 21 → 25
OpenRewrite UpgradeToJava25
Fix deprecations
IDE + recipes
Run full test suite
CI
Table 10 — Coupled upgrade, automated
6.6 Worked example — module needing different DB
Module
Need
Option
Recommendations
Graph traversals
Extract service with Neo4j
Table 11 — Technology divergence → extraction
6.7 Worked example — database bottleneck
Mitigation
Effect
Read replica
−40% primary load
Cache product data
−30%
Move reports to warehouse
−20%
Table 12 — Before splitting DBs
6.8 Worked example — test slicing
Change in module
Tests run on PR
pricing
pricing + dependents
admin
admin only
Table 13 — Shorter feedback loops
6.9 Worked example — startup optimisation
Technique
Startup
Baseline
40 s
CDS archive
22 s
AOT + lazy init
12 s
Table 14 — Faster scaling
6.10 Worked example — fault isolation limit
Failure
Monolith
Module memory leak
All replicas degrade
Mitigation
Bulkheads, limits, separate process for risky jobs
Table 15 — Shared fate is a limitation too
6.11 Worked example — team contention
Teams
Contention symptoms
3
Rare
10
Merge conflicts, release queues
Table 16 — Organisation size matters
6.12 Worked example — extraction candidates scoring
Module
Scaling
Cadence
Tech
Boundary clean
Extract?
search
High
Med
Diff (OpenSearch)
✔
Yes
admin
Low
Low
Same
✔
No
ordering
Med
High
Same
✘
Fix boundary first
Table 17 — Score, then decide
6.13 Worked example — cost of extraction
Item
Effort
New pipeline, infra
1 week
Data sync/migration
2–4 weeks
Ops & monitoring
ongoing
Table 18 — Extraction isn't free
6.14 Worked example — deploy vs release
Concept
Mechanism
Deploy
Code to production (flag off)
Release
Flag on for users
Table 19 — Decouple to reduce coupling pain
6.15 Worked example — capacity planning
Load profile
Pods
Night
2
Peak
12
Sale
30 (HPA)
Table 20 — Scale replicas elastically
6.16 Worked example — upgrade cadence policy
Policy
Benefit
Upgrade framework every minor release
Small steps instead of big-bang
Table 21 — Reduces technology coupling pain
6.17 Worked example — symptoms dashboard
Signal
Red if
Pipeline time
> 30 min
Deploy frequency
< weekly
CPU utilisation variance by module
> 5×
Table 22 — When to revisit architecture
6.18 Worked example — ADR revisit trigger hit
ADR-001 trigger
Status
> 30 engineers
Reached (34)
Divergent scaling
Search yes
Action
Extract search; keep rest modular
Table 23 — Selective extraction
6.19 Worked example — distributed monolith trap
Mistake
Result
Split all modules at once, shared DB
All three limitations + network costs
Table 24 — Extract selectively and properly
6.20 Worked example — scaling read vs write
Path
Solution
Reads
Replicas, cache, read models
Writes
Vertical DB scaling, partitioning, extraction
Table 25 — Different techniques
6.21 Worked example — interview answer
Limitation
Mitigation first
Extract when
Scaling
Replicas, cache, read models
≥ 5× divergence
Deployment coupling
Flags, trunk, test slicing
Teams blocked
Technology coupling
Frequent upgrades
Different stack needed
Table 26 — Structured answer
7Common Problems & Mistakes
Scaling the whole app for one hot module indefinitely.
Release trains accepted as normal.
Big-bang upgrades after years of neglect.
Extracting everything at once.
Extracting modules with dirty boundaries.
No metrics to justify decisions.
Most of these mistakes come from treating the limitations as all-or-nothing. Teams either live with the pain, scaling forty full replicas for one hot module or accepting fortnightly release trains as normal, or they react by splitting everything at once and end up with a distributed monolith that keeps the coupling and adds network failures. Upgrade neglect is the quiet version: skipping framework releases for years turns the eventual Java or Spring Boot jump into a multi-month project that freezes every team. Extracting a module with a dirty boundary, such as shared tables or calls into its internals, simply moves the coupling onto the network. The common fix is evidence: track deploy frequency, pipeline time and per-module resource use, and act on the module the data points to.
8Performance & Production Considerations
Aspect
Guideline
Scaling
Replicas, caches, read models, then extraction
Deployment
Flags, trunk-based, fast pipelines
Technology
Continuous upgrades with automation
Isolation
Bulkheads, separate pools/processes
Decisions
Metrics + ADR triggers
Table 27 — Operational guidelines
9Architecture & Design Considerations
Recognise limitations through measured symptoms.
Mitigate inside the monolith first.
Extract selectively modules with divergent needs and clean boundaries.
Avoid the distributed monolith.
10Interview Questions & Answers
Q1L1 · BasicConcept
What are the main limitations of a monolith?
The three classic limitations are whole-application scaling, deployment coupling and technology coupling, and all of them come from the monolith being one unit. Scaling means capacity is added by replicating the entire application, so a hot search module drags admin and reporting into every pod, and everything shares one database. Deployment coupling means all changes ship in one release, so one team's failing test or risky change delays everyone. Technology coupling means one language version, framework, library set and database engine for all modules, so upgrades happen all at once. There is also shared fate: a memory leak in one module degrades every replica. These hurt most as teams and load diverge.
Q2L1 · BasicConcept
Why is scaling a monolith inefficient for one hot module?
Because the unit of scaling is the whole application. Every new replica carries the memory, start-up time and connection pool of every module, even though only one module needs more capacity. In the note's sale example, search traffic grew 15 times, the monolith scaled to 40 pods that were mostly idle memory for other modules, and the shared database saturated anyway. Uniform tuning makes it worse, because one heap and GC configuration must suit every workload, and slow start-up delays autoscaling. Mitigations such as read replicas, caching and a search read model often fix the problem; extracting the module is justified when the divergence is large and lasting.
Q3L2 · IntermediateConcept
What is deployment coupling?
Deployment coupling means every module ships in the same artefact through the same pipeline, so each release contains everyone's changes. One team's defect, failing test or risky migration blocks or endangers all the others, and hotfixes wait for the next train. As the codebase grows, builds and test suites lengthen, so releases become less frequent and larger, which raises the change failure rate. You can measure it with deployment frequency, hotfix lead time, change failure rate and hours spent coordinating releases. In the note's example, nine teams sharing a fortnightly release meant that one team's broken tests stopped everyone, which is the classic symptom of deployment coupling.
Q4L2 · IntermediateDesign
How can you reduce deployment coupling without splitting?
Decouple deploying code from releasing features, and make the pipeline fast enough to ship often. Trunk-based development with short-lived branches keeps integration continuous. Feature flags, for example through OpenFeature, let unfinished or risky work be deployed switched off and enabled later per team or per user, so one team's change no longer holds back another's. Test slicing runs only the tests for changed modules and their dependants, while the Maven build cache and parallel tests cut pipeline time further. Enforced module boundaries with Spring Modulith reduce accidental breakage. In the note's example these changes moved nine teams from a fortnightly train to daily deploys without splitting the monolith.
Q5L3 · Senior EngineerConcept
What is technology coupling?
Technology coupling means all modules share one technical stack: Java version, framework version, libraries, database engine and runtime tuning. Any upgrade, such as Java 21 to 25 or a Spring Boot major version, must be done across the entire codebase at once, and conflicting library versions between modules become dependency hell. It also blocks choosing the right tool for one module: a recommendations engine that needs graph traversals must either squeeze into the shared PostgreSQL or force a new database into the shared runtime. Automation with OpenRewrite and Renovate plus frequent small upgrades reduces the pain, but a genuinely different technology need is a valid extraction trigger.
Q6L3 · Senior EngineerDesign
How do you scale reads in a monolith?
Take read load off the primary database and off the hot code path, in increasing order of effort. First, route read-only transactions to read replicas, for example by sending methods marked @Transactional(readOnly = true) to a replica data source; the note shows this cutting primary load by about 40%. Second, cache hot, slowly changing data such as products in Redis with clear TTLs. Third, build CQRS read models, such as an OpenSearch index fed by events, for queries the relational model serves badly. Moving reports to a warehouse removes heavy analytical queries. Remember that replicas and caches are eventually consistent, so read-your-writes paths must stay on the primary.
Q7L4 · Technical ArchitectTrade-off
When should a module be extracted?
Only when its needs genuinely diverge from the rest and the prerequisites are in place. Divergence means roughly five times different scaling, a team that needs an independent release cadence, or a different runtime or database. The prerequisites are a clean boundary, meaning an API and events with no shared tables or calls into internals, and a team able to operate a separate service with its own pipeline, monitoring and on-call rota. Extraction is not free: new infrastructure, data migration and ongoing operations. Score the candidates; in the note, search was extracted, admin stayed and ordering had to fix its boundary first. Extracting without these conditions produces a distributed monolith.
Q8L5 · Solution ArchitectScenario
How would you address monolith limitations in a growing company?
I would make it evidence-driven and incremental. First, measure the symptoms: deploy frequency, pipeline time, hotfix lead time, per-module CPU and memory, and upgrade effort. Second, mitigate inside the monolith: read replicas and caching for load; trunk-based development, feature flags and test slicing for releases; continuous automated upgrades for technology. Third, enforce module boundaries with Spring Modulith so that extraction becomes possible at all. Then score modules on scaling, cadence, technology and boundary cleanliness, and extract the top candidate with the strangler fig pattern behind the gateway, canary first. Everything else remains a modular monolith, with ADR revisit triggers such as team size or scaling divergence.