---
title: "How micro should your microservices be?"
description: "Klarna split each payment option (pay now, pay later, pay over time) into its own microservice, but shared logic such as authentication, funding sources and risk assessment produced a distributed monolith full of duplicated code and cross-team coordination."
url: "https://swe.quest/articles/how-micro-should-your-microservices-be-7b37e4a4abc23c4f"
canonical: "https://engineering.klarna.com/how-micro-should-your-microservices-be-9ae7507a625c"
source: "Klarna Engineering"
published: "2025-03-24"
difficulty: "easy"
kind: "Case study"
reading_minutes: 7
tags: ["microservices","system-design","payments","refactoring"]
---

# How micro should your microservices be?

A post on [Klarna Engineering](https://swe.quest/sources/klarna.md), published 2025-03-24, 7 min read, Case study. Original: [https://engineering.klarna.com/how-micro-should-your-microservices-be-9ae7507a625c](https://engineering.klarna.com/how-micro-should-your-microservices-be-9ae7507a625c)

## Summary

Klarna split each payment option (pay now, pay later, pay over time) into its own microservice, but shared logic such as authentication, funding sources and risk assessment produced a distributed monolith full of duplicated code and cross-team coordination. A monorepo of still-separate services didn't fix it. Guided by Domain-Driven Design, the team consolidated payments into a modular monolith split by feature modules, with one service and one database and a configurable flow assembled from reusable steps. New payment options now launch in days instead of weeks or months, and the service handles over a million orders daily, including a third of Klarna's Black Friday transactions. The tradeoffs are a single point of failure and the need for strong shared coding and release standards.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Microservices](https://swe.quest/tags/microservices.md) (Backend & APIs)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Payments & fintech](https://swe.quest/tags/payments.md) (Domains)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)

## Prerequisites

- microservices architecture ([easy posts on Microservices](https://swe.quest/tags/microservices.md?difficulty=easy))
- Domain-Driven Design basics

## Keywords

Klarna, modular monolith, Domain-Driven Design, distributed monolith, monorepo

## Related posts

- [You Want Microservices, But Do You Really Need Them?](https://swe.quest/articles/you-want-microservices-but-do-you-really-need-them-a1cb73ee67660042.md): Docker · 2025-11-28 · Easy · 14 min read · Microservices, System design, Cost optimization
  Microservices trade the simplicity of one codebase for network seams, distributed data consistency problems, slow and brittle cross-service testing, and heavy operational tooling, and that trade only pays off at large scale with clear domain boundaries and mature teams.
- [Parallel Run Pattern - A Migration Technique in Microservices Architecture](https://swe.quest/articles/parallel-run-pattern-a-migration-technique-in-microservices-architecture-762d770d757278f2.md): Zalando Engineering · 2021-11-03 · Medium · 9 min read · Refactoring & migrations, Microservices, Deployment, Testing, Observability
  Zalando's Returns team extracted returns logic from a legacy monolith into a new microservice using the Parallel Run pattern.
- [Keep the monolith, but split the workloads](https://swe.quest/articles/keep-the-monolith-but-split-the-workloads-a46b5ee6a5f1e352.md): incident.io · 2023-04-12 · Medium · 9 min read · Resilience, System design, PostgreSQL, Go, Microservices
  A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services.
- [How we use GraphQL at Europe's largest fashion e-commerce company](https://swe.quest/articles/how-we-use-graphql-at-europe-s-largest-fashion-e-commerce-company-98c53d6b8b858147.md): Zalando Engineering · 2021-03-03 · Easy · 6 min read · GraphQL, API design, Microservices, E-commerce, Resilience
  Zalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams.
- [Scaling Git at OpenAI](https://swe.quest/articles/scaling-git-at-openai-cd141be9cdce804b.md): OpenAI · 2026-11-02 · Hard · 24 min read · Version control, Distributed systems, Consistency models, Scaling, Storage systems
  Pando is OpenAI's new Git backend for its monorepo, built to handle the concurrent pushes and fetches generated by Codex-driven parallel development while staying fully compatible with the Git protocol and client.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
