Running Loki in HA monolithic mode

HA monolithic mode gives Loki redundancy with several instances running target all on shared object storage, without operating separate microservices. This page explains when it fits, how to build it, and when to move on.

On this page

When HA monolithic mode is the right Loki deployment

A team that needs Loki to keep ingesting and serving queries when one instance fails, but whose log volume is modest, is the usual fit for HA monolithic mode. In this mode, several identical Loki instances run with the -target=all setting, share the same object storage bucket for chunks and index, and find each other through memberlist, which forms the hash ring that distributes incoming streams. There are no separate read, write or backend processes to size and operate. The mode sits between single-binary monolithic mode and microservices mode, and it replaces simple scalable mode, which Grafana Labs is deprecating. The Loki deployment modes documentation places monolithic operation at small read and write volumes, up to approximately 20 GB of logs per day.

Before you choose this mode, measure your expected daily ingestion, including peaks, and compare it with that guideline. Then check the other half of the decision: how many queries run at the same time and how long they span. Volume alone does not settle it. A small log stream with heavy dashboard and alerting query load can outgrow a fleet of monolithic instances sooner than the daily total suggests. Confirm the expected query concurrency with the people who run your dashboards and alert rules, and record it alongside the volume figure.

Plan now for the point where you will leave this mode. If your volume is growing toward the upper bound, or if you need to scale reads and writes independently, the migration to microservices mode is a larger change than adding instances. Decide in advance which object store, network path and memberlist configuration you will keep, so that the move does not also become a storage migration. Ask your team to document the trigger, such as sustained ingestion near the guideline or query latency that more replicas do not fix, so the decision is made on evidence rather than during an incident.

How the three Loki deployment modes compare

Monolithic mode runs Loki as a single binary that handles ingestion, querying, compaction and the other roles in one process. The Loki deployment modes documentation places it at small read and write volumes, up to about 20 GB of logs per day. It is the simplest mode to stand up and reason about, which makes it the usual choice for a proof of concept or a small team with modest log volume.

  • What runs: one Loki process, typically one instance, with its own configuration file and storage settings.
  • Volume range: up to about 20 GB per day according to the documentation.
  • Failure impact: if the single instance stops, ingestion and queries stop until it recovers.
  • Operator effort: one component to upgrade, monitor and back up, with the lowest coordination overhead.
  • Growth path: moving past the volume range or needing redundancy usually means changing modes, not just adding a node.

Before choosing this mode, confirm your real daily ingestion and whether a short outage of log ingestion is acceptable to your operations and audit teams.

How memberlist and shared storage give one ring without microservices

High availability in HA monolithic mode rests on one idea: every instance runs the same -target=all process, and those instances find each other and agree on ring membership through memberlist, a gossip-based library Loki uses to share ring state. Each instance starts the components it needs (distributor, ingester, querier, query frontend, compactor and the rest), and the ingesters join a shared hash ring so that incoming streams are spread across the healthy members. Queriers use the same ring information to reach the ingesters holding recent data. Your job before go-live is to confirm that memberlist traffic is allowed between every pair of instances and that ring membership looks healthy on each one, because an instance that cannot gossip still runs, but it quietly forms its own partial view of the cluster.

Shared storage is the other half of the design. Ingesters flush compressed chunks and their index to object storage, and queriers read from that same store, so every instance must reach the same bucket and the same index configuration. If one instance points at a different bucket, prefix, or schema, it will accept writes that no other instance can read back, and retention will only apply to the data the compactor can see. Treat the bucket name, credentials, and schema_config as cluster-wide settings that are stored once in a single configuration and deployed identically to every instance. Confirm the object store choice against the recommended production options in the Loki storage documentation, since MinIO and the local filesystem are supported but not typically recommended for production.

High availability protects against the loss of one instance, not against everything that can fail. A replicated ring keeps writes and queries running when a single process or host goes down, but it does not raise the throughput ceiling for one tenant beyond what the monolithic mode is designed to handle, and it does not remove the dependency on the object store. If the storage backend, its network path, or its credentials fail, every instance is affected at once and the cluster is unavailable regardless of replica count. Plan a separate recovery story for the bucket itself, including versioning or replication where your provider supports it, and test that a restored instance rejoins the ring cleanly. Volume growth is the other limit: if you are approaching the volume where the deployment modes documentation recommends a different topology, plan the move to microservices mode before the ring becomes the bottleneck.

Configuration options and when each one fits

This table compares the main configuration choices for a Loki HA monolithic deployment, from object store and index to tenancy, retention, ring membership and replication. Read each row as a decision: the option, when it fits, and what to confirm in the configuration reference for your Loki version before you commit.

SettingOption and when it fitsWhat to confirm
Object storeAmazon S3, Google Cloud Storage or Azure Blob Storage fits production. These are the recommended production stores in the Loki docs.Bucket or container layout, credentials method and that every instance points at the same bucket.
Object store (alternative)S3-compatible stores such as MinIO or a local filesystem suit labs and evaluation. The docs note they are not typically recommended for production.Whether your on-premises object store meets your durability and availability requirements before you rely on it.
Index storeTSDB fits Loki 2.8 and newer. DynamoDB, Bigtable and Cassandra are deprecated, so avoid them for new builds.Schema configuration and period settings for your exact Loki version, and the upgrade guide if you are migrating an older index.
Authentication (auth_enabled)Set to true when several teams or customers share one cluster and need separate data. Leave false only for single-tenant use.That every client sends the X-Scope-OrgID header, and that a reverse proxy handles authentication in front of Loki.
Retention (retention_enabled)Off by default, so logs are kept indefinitely. Enable it on the compactor when you have a written retention period.Retention scope (global, per tenant or per stream), the 24-hour minimum per rule, and that the compactor runs with a suitable working directory.
Memberlist join addressesUse the memberlist service for the ring. Every instance needs the same join list so instances find each other across hosts or pods.Gossip port reachability between instances (TCP 7946 by default) and ring health after each restart or scaling change.
Replication factorHigher values keep data available through instance loss but increase write work and storage. Match it to the number of instances you run.The replication_factor value for your version, and whether one-instance outages are tolerated during writes.
Deployment modeChoose HA monolithic for moderate volumes, around 20 GB per day or less, with several identical instances. Move to microservices when volume or query load outgrows it.Current deployment mode guidance, since simple scalable mode is being deprecated and removed with Loki 4.0.

Building an HA monolithic Loki cluster step by step

This sequence takes a small Loki estate from a volume check to a set of identical instances that share object storage, join one ring, accept writes and serve queries behind an authenticating proxy. Each step ends with a check you can run before moving on.

  1. Confirm the volume fits monolithic mode

    Before building anything, measure the expected daily log ingestion across all sources and compare it with the monolithic range of roughly 20 GB per day. HA monolithic mode is meant for moderate volumes, so if you are well above that range, or expect to grow past it soon, plan for microservices mode now rather than rebuilding later. Confirm the current volume with your platform owners and record the growth assumption. The step is done when the team signs off on a number and a growth horizon in writing.

  2. Provision object storage and scoped credentials

    Create the bucket or container for log chunks and the index, using one of the production object stores Loki supports, such as Amazon S3, Google Cloud Storage or Azure Blob Storage. Give every instance a credential with the minimum access it needs to read and write that bucket, and keep those credentials in your secrets manager rather than in plain configuration files. Confirm object store settings, bucket versioning and lifecycle rules against the Loki storage documentation before writing config. The check is a test write and read from each node using the same credential it will run with.

  3. Set a shared TSDB schema configuration

    Write one Loki configuration file used by every instance, with the object store settings, the TSDB index store and a schema config block that defines the period from which TSDB applies. Every instance must read identical schema and storage sections, because a mismatch leads to instances that write data other instances cannot find. Store the file in version control and deploy it from there. The check is a configuration diff across nodes that shows no differences in the schema and storage sections.

  4. Configure memberlist join peers across instances

    Enable memberlist as the ring backend and list the addresses of the other instances as join peers, so each node gossips with the others and forms one ring. Confirm the gossip port is open between nodes, and that the addresses are stable so nodes can rejoin after a restart. Plan this before scaling out, because adding nodes later with inconsistent peer lists is a common source of split rings. The check is that every instance reports the same set of members on the ring status page.

  5. Run target all on each node

    Start Loki on every node with the all target, which runs the write, read and backend components in one process. Use the same binary version on every node and pin it, so upgrades are rolled out deliberately. Run each instance under a process supervisor or container orchestrator that restarts it on failure. The check is that each node reports ready and appears as an active member of the ring with a healthy state.

  6. Place an authenticating reverse proxy in front

    Loki does not provide its own authentication layer, so put an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of the instances and balance traffic across them. Configure the proxy to authenticate users or services, then pass tenant identity through the X-Scope-OrgID header when multi-tenancy is in use. Decide how clients reach the proxy, and confirm which paths are exposed. The check is that an unauthenticated request is refused, and that an authenticated write and query succeed through the proxy from every instance.

  7. Enable compactor retention deliberately

    Retention is disabled by default, so logs are kept indefinitely until you turn it on. Decide retention per tenant or per stream selector based on your policy, enable the compactor with retention, and set rules of at least 24 hours each as the documentation requires. Test the configuration on a non-production tenant first and confirm the deletion behavior matches what your policy describes. The check is a documented retention rule for each tenant and a test stream that is removed after its retention period.

  8. Verify ring health and failover end to end

    Run a final acceptance test. Write logs through the proxy, query them from every instance, then stop one node and confirm writes and queries still succeed through the remaining nodes. Restart the node and confirm it rejoins the ring. Record the results, the configuration version and the peer list as your baseline for operations. The step is done when the failover test passes and the baseline is stored with the configuration.

How clients, the reverse proxy, Loki instances and object storage connect

Collectors and Grafana send requests to one authenticating reverse proxy, which passes them to several Loki instances running target all. Each instance joins the same memberlist ring and writes chunks and index data to one shared object storage bucket. Loki has no built-in authentication, so the boundary between the proxy and Loki is where your access control must hold. Check that Loki is reachable only from the proxy and from its peers, and that every request carries the expected X-Scope-OrgID tenant header.

Clients reach Loki only through the proxy, and instances share one ring and one bucket.

Security and operational risks of running HA monolithic Loki

HA monolithic Loki runs the same binary on several nodes against shared storage, so the risks sit at the edges: who can reach the API, which tenant a request belongs to, what the storage credentials can do, and how long data lives. Each card below is a control to design and verify before the cluster takes production logs.

Authenticating reverse proxy in front

Loki has no built-in authentication layer, so the documentation requires an authenticating reverse proxy such as nginx, HAProxy, OAuth2 Proxy or Pomerium in front of it. Every push and query path, including the ones your collectors and Grafana use, must pass through that proxy. Check that the instance ports for each node are not reachable directly from the network, because a direct connection bypasses the proxy entirely.

Loki authentication docs

Tenant isolation through X-Scope-OrgID

When auth_enabled is true, Loki treats the X-Scope-OrgID header as the tenant identifier on every request. The proxy must set or verify that header from the authenticated identity, because a client that can choose its own header value can read another tenant's data. Test with two tenants and confirm that a query for one never returns the other's streams.

Multi-tenancy docs

Least-privilege bucket credentials

All nodes share one object store, so the credentials in the storage configuration grant access to every chunk and index object. Create a dedicated principal for Loki scoped to its bucket, rotate its keys on a schedule, and keep the keys out of plain configuration files where your secrets tooling allows. Ask your storage team which permissions the chosen store requires for writes, reads and deletes, and grant no more than that.

Memberlist exposure between nodes

Nodes find each other and share ring state over memberlist gossip, which the cluster uses for coordination. Anyone who can reach that port on the node network can observe or disrupt ring membership. Restrict the gossip port to the addresses of the Loki nodes with host or network firewall rules, and keep it off any network that clients or untrusted workloads share.

Retention and deletion off by default

The compactor applies retention only when retention_enabled is set, so logs stay in the bucket indefinitely until you configure it. Storage cost and the amount of data exposed in a breach both grow with that age. Decide retention per tenant or per stream selector before go-live, confirm the compactor is running, and verify with a test tenant that old chunks are removed as expected.

Retention docs

Backup and recovery of the bucket

Running several instances does not protect against deletion or corruption of the bucket, because every node reads the same data. Decide whether the bucket needs versioning, replication or an independent backup, and who can restore it. Write a recovery test that restores a bounded time range into a separate environment and queries it, so you learn the restore steps before an incident requires them.

Signs that growth means moving to microservices mode

Plan the move to microservices mode before volume forces it. HA monolithic mode is sized for small read and write volumes, and the Loki deployment modes documentation places its practical ceiling at approximately 20 GB per day. Track your sustained daily ingestion over several weeks, not a single peak, and start the migration conversation when that trend approaches the monolithic range. Also watch for query load that starves writes: when heavy dashboards, alert rules or ad hoc investigations slow ingestion, the instances are sharing one process budget and the write path is paying for the read path. Confirm with your own metrics which of these signals appears first, because the fix differs for each.

Independent scaling is the stronger reason to move. In microservices mode, read, write and backend components scale separately, so you add query capacity without resizing the ingestion path. Ask whether your team can name the component that is the bottleneck today. If the answer is unclear, the problem is probably not yet solvable by splitting components, and you should first check ring health, limits and query patterns. Also assess team capacity honestly: microservices mode means operating more components, each with its own sizing, rollout, monitoring and failure modes, and the team must own that work after the migration. The Loki documentation also states that simple scalable mode is being deprecated and will be removed with the Loki 4.0 release, so verify the current migration guidance for your version before choosing a target.

A migration changes the operating model, not just the configuration. It involves a new deployment method, storage and ring settings reviewed for each component, a reverse proxy in front of the query and push paths, and new dashboards and alerts for every component. Plan it as a scheduled project with a rollback path, a test environment that mirrors your ingestion volume, and a window agreed with the teams that send and query logs. Do not start it during an incident, when rushed changes to ring membership or storage settings are most likely to cause data gaps. Ask any partner to show the migration plan, the validation steps and the ownership model for each component before work starts.

Questions teams ask before running HA monolithic Loki

How much effort does an HA monolithic Loki build take, and what drives it?

Effort depends on four things: the daily log volume, the object store you choose, how much identity and proxy integration is needed, and how many retention rules you must define. HA monolithic mode is designed for small read and write volumes, with the Loki documentation placing monolithic workloads at approximately 20 GB per day, so a higher expected volume moves the design toward a different deployment mode. Object storage choice adds work because Amazon S3, Google Cloud Storage and Azure Blob Storage are the recommended production stores, while S3-compatible stores such as MinIO need more validation. Authentication adds work because Loki has no built-in authentication layer and needs an authenticating reverse proxy in front of it. Ask any quote to break effort down by these four drivers and to state which assumptions it relies on, including the daily volume you provided.

Can an internal team run HA monolithic Loki without outside help?

Yes, a capable platform team can build it, provided it has skills in Linux, container or Kubernetes operations, object storage, TLS, reverse proxies and Grafana. The team needs to understand how the single Loki binary runs with the target set to all, how the memberlist ring keeps instances coordinated, how the compactor applies retention, and how tenants are identified with the X-Scope-OrgID header when auth_enabled is true. Most gaps show up in the reverse proxy and identity layer and in restore testing for object storage. Ask whether your team has people who have run object storage and a reverse proxy in production, and whether they can own on-call for Loki. An outside partner is most useful for fixed-scope design, configuration review and handover documentation.

What does DeployOpen need from our team to start?

DeployOpen needs enough access and information to design the build against your real environment before work begins. That typically means access to the object storage buckets and the permissions to create them or confirm their settings, network paths between Loki, your collectors, the reverse proxy and Grafana, and a way to test identity integration with your identity provider. It also needs a log volume estimate, the number of teams or environments that will become tenants, the retention periods your policies require, and the clients that will send data, such as Grafana Alloy, Fluent Bit or the Docker logging driver. Your team should also name an owner for secrets, TLS certificates and the production sign-off. These inputs are written into the scope so the quote reflects them.

How long does the path to production take?

The timeline depends on scope, mainly the number of integrations, how many tenants and retention rules are needed, whether identity and proxy work is included, and how quickly your teams approve storage, network and certificate requests. A proof of concept with one object store and a few collectors is much shorter than a production build that includes SSO, per-tenant limits and restore testing. Because most engagements are fixed-scope, the agreed scope, deliverables and timeline are written down before work starts. Ask for the timeline to be split into design, build, testing and handover phases, with the dependencies on your approvals named. Any date you are given should trace back to the written scope rather than a generic estimate.

Is HA monolithic mode enough, or do we need microservices?

HA monolithic mode is a good fit when volume stays within the small range the Loki documentation describes, and when you want high availability and moderate horizontal scale without operating separate microservices. The Loki deployment modes documentation places it between monolithic and microservices mode, and notes that it replaces simple scalable deployment, which Grafana says is being deprecated and will be removed with Loki 4.0. Move toward microservices mode when volume grows well beyond the monolithic range, when read and write paths need to scale independently, or when query load creates contention that scaling instances cannot solve. Plan the move early by keeping object storage, schema and configuration choices portable, and ask your partner to document the trigger points you will monitor.

What changes if we later need Grafana Enterprise Logs features?

Moving to Grafana Enterprise Logs changes the product and its license, not the basic log layout in object storage. GEL is Grafana Labs' commercial product based on Loki and adds token authorization, label-based access control and cross-tenant queries. GEL entered long-term support with version 3.6 and reaches end of life on February 1, 2029. Loki itself is licensed under AGPLv3, which Grafana Labs announced on April 20, 2021, so review your license obligations with counsel before adding commercial features or changing how users reach the service. Ask for the migration path, the version compatibility checks and the licensing review to be included in the scope, so the choice is made with written facts instead of assumptions.

How DeployOpen scopes and delivers HA monolithic Loki

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For Loki in HA monolithic mode, we work from a written scope that fixes the instances, object storage, memberlist ring, retention and access path before any build starts.

How we scope

  • Confirm daily log volume against the roughly 20 GB per day guidance for monolithic-style deployments.
  • Agree which object store you use and whether it is one of the production stores the Loki docs recommend.
  • Define the instance count, failure domains and load balancer design for the HA monolithic instances.
  • Record retention periods, tenant model and the authenticating reverse proxy that sits in front of Loki.
  • Set out in writing when a move to microservices mode should be reviewed, and what triggers it.

How we build

  • Deploy several Loki instances running target all against shared object storage in your environment.
  • Configure memberlist so instances form one ring, and verify ring membership after each change.
  • Apply the storage, index and compactor settings the Loki documentation requires for your chosen Loki version.
  • Place an authenticating reverse proxy in front of Loki and connect Grafana through it.
  • Test failover by stopping instances one at a time while ingestion and queries continue to run.

How we hand over

  • Deliver the configuration, ring topology and network diagram as documentation your team can review.
  • Document the runbook for adding instances, rotating credentials and restoring from object storage.
  • Walk your operators through ring health checks, ingestion metrics and the signs that capacity is running out.
  • Provide a written record of verification results, including the failover tests and their outcomes.
  • Agree the handover criteria in the written scope so acceptance is based on tests you can repeat.

How we support

  • Offer ongoing upgrades, monitoring review and fixes as a retainer, separate from the fixed-scope build.
  • Plan Loki version upgrades against the official upgrade guide before any change is made.
  • Review retention, tenant limits and capacity each time log volume or team usage changes materially.
  • Support the move from HA monolithic mode to microservices mode if growth exceeds what one deployment mode can serve.
  • Ask your quote to state which support tasks are included, what is billed by the hour, and what response terms apply.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.