What is Polyglot Persistence?
Topic: microservices, Data Management. Level: Basic.
Answer
Polyglot persistence means using different database technologies for different services based on each one's data access patterns — a natural consequence of database-per-service. E.g. a catalog service uses a document store, a session service uses Redis, a fraud service uses a graph DB, and an orders service uses PostgreSQL. The benefit is fit-for-purpose storage; the cost is more operational surface area (backups, expertise, monitoring per engine), so teams standardize on a small approved set.
```text
catalog-service -> MongoDB (flexible product documents)
cart-service -> Redis (fast, ephemeral, TTL)
orders-service -> PostgreSQL (transactions, integrity)
recommendation svc -> Neo4j (graph traversals)
search-service -> Elasticsearch(full-text, relevance)
```