The read-write mode provides an alternative to monolithic and microservices modes.
In read-write mode, components are grouped into three services to ease the operational overhead whilst still allowing scale to be tuned separately on the read and write paths. The services group the components as follows:
- read
- query-frontend
- querier
- backend
- store-gateway
- compactor
- (optional) ruler
- (optional) alertmanager
- (optional) query-scheduler
- (optional) overrides-exporter
- write
- distributor
- ingester
Similar to the other modes, each Grafana Mimir process is invoked with its -target
parameter set to the specific service: -target=read
, -target=write
, or -target=backend
.
The below diagram describes the various components of this deployment, and how data flows between them.
flowchart LR
A -->|writes| GW -->|writes| D -->|writes| I -->|writes| M
G -.->|reads | GW -.->|reads | QF -.->|reads | Q -.->|reads | SG -.->|reads| M
subgraph Minio
M{"Object Storage"}
end
subgraph Agent["Grafana Alloy"]
A("alloy")
end
subgraph Grafana
G("grafana")
end
subgraph Gateway["Load Balancer"]
GW{"Nginx"}
end
subgraph MimirWrite["mimir -target=write"]
D("distributor")
I("ingester")
end
subgraph MimirBackend["mimir -target=backend"]
SG("store-gateway")
C("compactor")
C -->|writes| M
C -.->|reads | M
end
subgraph MimirRead["mimir -target=read"]
Q("Querier") -.->|reads| I
QF("query-frontend")
end
Install dependencies tools
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"
make install-build-deps
Create a cluster and mapping the ingress port 80 to localhost:8080
make cluster
Deploy manifests
make deploy-read-write-mode-metrics
Once all containers are up and running you can search for metrics in Grafana.
Navigate to http://localhost:8080/explore and select the search tab.
make delete-read-write-mode-metrics