# modular-monolith

Published articles for modular-monolith.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## When Microservice Decomposition Is the Wrong Default

DevFeed: [When Microservice Decomposition Is the Wrong Default](<https://devfeed.tech/articles/when-microservice-decomposition-is-the-wrong-default-34109.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/microservice-decomposition-heuristic/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-08-21T07:00:00Z

Content type: opinion

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [Microservice](<https://devfeed.tech/topics/microservice.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [FastAPI](<https://devfeed.tech/topics/fastapi.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [circuit](<https://devfeed.tech/tags/circuit.md>), [docker](<https://devfeed.tech/tags/docker.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [migration](<https://devfeed.tech/tags/migration.md>), [modular-monolith](<https://devfeed.tech/tags/modular-monolith.md>), [monolith](<https://devfeed.tech/tags/monolith.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

### AI overview

The article argues that splitting a small system into microservices should not be the default. It recommends keeping responsibilities in a modular monolith unless differences in scaling needs, organizational boundaries, or failure isolation justify a network boundary, whose costs include contracts, compatibility management, retries, timeouts, circuit breaking, and distributed tracing.

### Source excerpt

import-linter forbidden contract as a module boundary: a FastAPI modular monolith instead of early microservices, and when a network split pays off.

## Modularizing SOLR Query Creation for Multi-Market Scale

DevFeed: [Modularizing SOLR Query Creation for Multi-Market Scale](<https://devfeed.tech/articles/modularizing-solr-query-creation-for-multi-market-scale-22544.md>)

Original publisher: [Read original article](<https://medium.com/walmartglobaltech/modularizing-solr-query-creation-for-multi-market-scale-a1f34e28b631?source=rss----905ea2b3d4d1---4>)

Author: Naman Parikh

Published: 2026-03-03T12:18:55Z

Content type: tutorial

Language: en

Sources: [Walmart Global Tech](<https://devfeed.tech/sources/walmart-global-tech.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [debug](<https://devfeed.tech/topics/debug.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [developer](<https://devfeed.tech/tags/developer.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [information-retrieval](<https://devfeed.tech/tags/information-retrieval.md>), [modular-monolith](<https://devfeed.tech/tags/modular-monolith.md>), [monolithic-architecture](<https://devfeed.tech/tags/monolithic-architecture.md>), [regression](<https://devfeed.tech/tags/regression.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [technical](<https://devfeed.tech/tags/technical.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article describes modularizing a 12,000-line SOLR query creation implementation used across multiple markets. It explains how separating query concerns, adding market-specific configuration, and using stronger typing aimed to reduce coupling, regression risk, and runtime errors.

### Source excerpt

Introduction When the SOLR query logic expanded into a 12,000-line monolithic implementation, each modification introduced significant risk, making every change feel akin to defusing a critical system. Adding a market-specific override required yet another if block, compounding complexity and slowing time-to-market. In this article, we will deep dive how we broke that SOLR query creation logic, enabling clean configuration per market, stronger typing, reducing technical debts and dramatically reduced runtime errors. Image generated with DALL-E via ChatGPTThe Problem: When SOLR Queries Creation Logic Become Technical Debt The SOLR query logic class was handling filtering logic, boosting logic, boost functions, pagination etc. All the parameters related to SOLR query was getting generated using single class. Overthe time, this core class handled various logics related to different type of queries: Primary search queries Item insertions via business tools Item insertions via semantic sources Thousands of lines tangled edge-case handling, scoring tweaks, and boosting logic. This unscalable approach: Blocked rapid iteration for new markets Tight Coupling: All query-handling logic lived in one massive class, making it difficult to cleanly separate concerns. Market-specific changes could unintentionally affect unrelated logic, requiring exhaustive regression testing. High Risk of Unintended Consequences: Changing business requirements (such as supporting different filtering or boosting strategies for a new market) entailed changing existing code that already served other markets. Developers had to be extremely cautious, as a bug or oversight could break unrelated functionality. No Configuration Flexibility: There was no clear system for externalizing market-specific configuration. Instead, all logic changes happened directly in code, preventing business users or product managers from making simple market changes without developer intervention. Increased Runtime exceptions

## Choosing the Right Granularity for Microservices: Klarna's Payments Architecture Journey

DevFeed: [Choosing the Right Granularity for Microservices: Klarna's Payments Architecture Journey](<https://devfeed.tech/articles/how-micro-should-your-microservices-be-35650.md>)

Original publisher: [Read original article](<https://engineering.klarna.com/how-micro-should-your-microservices-be-9ae7507a625c?source=rss----86090d14ab52---4>)

Author: Raya Rizk

Published: 2025-03-24T07:22:27Z

Content type: article

Language: en

Sources: [Klarna Engineering](<https://devfeed.tech/sources/klarna-engineering.md>)

Topics: [Microservices](<https://devfeed.tech/topics/microservices.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Development](<https://devfeed.tech/topics/development.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [challenges](<https://devfeed.tech/tags/challenges.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [klarna](<https://devfeed.tech/tags/klarna.md>), [led](<https://devfeed.tech/tags/led.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [modular-monolith](<https://devfeed.tech/tags/modular-monolith.md>), [monolith](<https://devfeed.tech/tags/monolith.md>), [organizational-structure](<https://devfeed.tech/tags/organizational-structure.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>)

### AI overview

This article describes Klarna's transition from a monolithic architecture to payment-specific microservices and examines the trade-offs of service granularity. It reports that independently managed services improved team autonomy and development speed, while duplicated shared functionality created a complex distributed monolith.

### Source excerpt

Our journey towards striking the right balance The debate between monolithic and microservices architectures is a hot topic in software development. While monolithic systems are known for their simplicity and tightly integrated structure, they face challenges with scaling and flexibility. In contrast, microservices offer greater scalability and autonomy in development, but carry complexity in inter-service interactions. In this article, I'll share our experience in navigating between these two paradigms while working on a recent project at Klarna, exploring different architectural decisions while addressing a fundamental question: what is the optimal granularity for a microservice? From monolith to microservices: the company is growing 🚀 A monolithic architecture is often the natural starting point for businesses, serving well initially but revealing its limitations as organizations scale. Klarna was no exception. Like many in the IT industry, the company embraced the microservices paradigm alongside its rapid growth a few years ago. In the payments domain, we are focused on offering customers various payment options, allowing them to choose between paying directly, later, over time, or through other tailored methods. This demand for diverse options led each payment method to evolve into a distinct microservice, managed by dedicated teams. Each payment service acts as a key orchestrator in the purchase flow, coordinating with other services to guide customers through the required steps until order completion. This adoption of microservices naturally aligned with the company's organizational structure, offering team autonomy and the ability to scale services independently. Each service was self-contained, with its own database and code residing in a separate repository. By decoupling payment options into distinct services, we gained greater flexibility and enabled faster development cycles, as teams could focus on their respective components. Landing the distributed

## Modularizing Rails Monoliths One Bite at a Time

DevFeed: [Modularizing Rails Monoliths One Bite at a Time](<https://devfeed.tech/articles/modularizing-rails-monoliths-one-bite-at-a-time-20038.md>)

Original publisher: [Read original article](<https://technology.doximity.com/articles/modularizing-rails-monoliths-one-bite-at-a-time>)

Author: Doximity

Published: 2023-12-05T13:00:00Z

Content type: article

Language: en

Sources: [Doximity](<https://devfeed.tech/sources/doximity.md>)

Topics: [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>)

Tags: [microservices](<https://devfeed.tech/tags/microservices.md>), [modular-monolith](<https://devfeed.tech/tags/modular-monolith.md>), [modularization](<https://devfeed.tech/tags/modularization.md>), [modules](<https://devfeed.tech/tags/modules.md>), [rails](<https://devfeed.tech/tags/rails.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [ruby-on-rails](<https://devfeed.tech/tags/ruby-on-rails.md>)

### AI overview

The article describes using a phased refactoring approach and the packwerk gem to modularize growing Rails monoliths into modules with enforced boundaries. It presents the modular monolith as a lower-complexity alternative to adopting microservices and references Doximity's experience.

### Source excerpt

As Rails monoliths grow, coupling becomes increasingly difficult to manage. Developers often reach for microservices to help simplify things, but instead find higher complexity. The Modular Monolith approach is a proven, lightweight alternative that offers the benefits of enforced boundaries without being cumbersome. I spoke at the 2023 Rocky Mountain Ruby conference on how teams can use a phased approach to refactoring toward this style using the packwerk gem. At Doximity, we've used this gem and a phased approach to break some of our most critical rails applications into modules that are easier for our teams to work with. In November, 2023, I also chatted with Elise Shaffer on The Ruby on Rails Podcast about our experience with application modularization at Doximity. Be sure to follow @doximity_tech if you'd like to be notified about new blog posts.

## Resource Bundle Look-ups in Modular Java Applications

DevFeed: [Resource Bundle Look-ups in Modular Java Applications](<https://devfeed.tech/articles/resource-bundle-look-ups-in-modular-java-applications-18863.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/resource-bundle-lookups-in-modular-java-applications/>)

Published: 2021-08-29T16:30:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [App](<https://devfeed.tech/topics/app.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [java](<https://devfeed.tech/tags/java.md>), [modular-monolith](<https://devfeed.tech/tags/modular-monolith.md>), [module](<https://devfeed.tech/tags/module.md>), [modules](<https://devfeed.tech/tags/modules.md>)

### AI overview

This article explains how to use Java ResourceBundle providers to manage locale-specific error-message resources across named modules in a multi-module application. It describes a design in which individual modules contribute their own bundles while a central component displays or logs messages without knowing the specific modules.

### Source excerpt

Table of Contents The ResourceBundleProvider Interface Resource Bundle Providers Running on the Classpath Discussion and Wrap-Up The ResourceBundle class is Java's workhorse for managing and retrieving locale specific resources, such as error messages of internationalized applications. With the advent of the module system in Java 9, specifics around discovering and loading resource bundles have changed quite a bit, in particular when it comes to retrieving resource bundles across the boundaries of named modules. In this blog post I'd like to discuss how resource bundles can be used in a multi-module application (i.e. a "modular monolith") for internationalizing error messages. The following requirements should be satisified: