+++
title = "Production Guide"
weight = 3
template = "docs/getting-started.html"

[extra]
weight = 3
+++

{% gs_header() %}
Your new cluster is running quickly and smoothly. Now let's make sure it stays that way. This guide covers the essential configurations and best
practices that separate a working prototype from a production-ready deployment. We'll walk through some production-ready basics like
backup coverage, usage monitoring, and index lifecycle planning.
{% end %}

<!-- Section 1: Understand Your Backup Coverage -->
{% gs_section(number="1", title="Understand Your Backup Coverage", intro="Bonsai automatically backs up your cluster. No
configuration required.") %}

{% gs_code() %}

- **Frequency:** Hourly snapshots
- **Retention:** 2 weeks
- **Storage:** Encrypted S3, multi-region
  {% end %}

{% admonition(type="info", title="What this means") %}
Up to 1 hour of data could be lost between a snapshot and an outage. For critical data, use an ACID database as your
source of truth and treat your search cluster as a secondary index.
{% end %}

{% gs_code() %}
Custom snapshot SLAs available for Enterprise plans. [Contact us](mailto:queries@bonsai.io) for details.
{% end %}

{% end %}

{{ gs_divider() }}

<!-- Section 2: Monitor Your Usage -->
{% gs_section(number="2", title="Monitor Your Usage", intro="Avoid surprise throttling by tracking usage against plan
limits.") %}


{% admonition(type="tip", title="Maximize performance with dedicated resources") %}
Business and Enterprise tier clusters are single-tenant: they come with 100% isolated resources.

No noisy neighbors. Guaranteed.
{% end %}

{% gs_code() %}

#### Key metrics to monitor

{% end %}

{% gs_metric_cards() %}
{{ gs_metric_card(title="Shards", icon="shards", location="Overview tab", location_href="https://app.bonsai.io", watch="Watch for approaching plan limit or
many small indices.", action="Consolidate indices
or [reduce shard count](/docs/cluster-management/optimization/reducing-shard-usage/).") }}
{{ gs_metric_card(title="Storage", icon="storage", location="Usage tab", location_href="https://app.bonsai.io", watch="Watch for steady growth or nearing disk
threshold.", action="Implement retention policy or upgrade plan.") }}
{{ gs_metric_card(title="Documents", icon="documents", location="Overview tab", location_href="https://app.bonsai.io", watch="Watch for unexpected spikes or
duplicate records.", action="Review indexing logic; check for reindex loops.") }}
{% end %}

{% admonition(type="info", title="Stay informed automatically") %}
You can enable weekly usage summary emails from your account settings in the Bonsai dashboard. These reports help you
spot trends before they become problems.
{% end %}

{% admonition(type="tip", title="Need more capacity?") %}
If you're approaching plan limits, compare available tiers and upgrade before you hit thresholds.

{{ gs_button(href="/pricing/", label="See all plans", variant="primary") }}
{% end %}

{% end %}

{{ gs_divider() }}

<!-- Section 3: Plan Your Index Lifecycle -->
{% gs_section(number="3", title="Plan Your Index Lifecycle", alt="true", intro="Bonsai doesn't auto-delete old data, but provides tools to help you manage retention.
Planning your index lifecycle helps control costs and maintain performance as your data grows.
Read [The Ideal Elasticsearch Index](/blog/ideal-elasticsearch-index/) for comprehensive guidance on capacity planning
and sharding strategies.") %}

{% gs_code() %}

#### Index Trimmer for automated cleanup

The Trimmer feature automatically removes old indices matching a pattern when they exceed a size threshold. See
the [Trimming Old Data guide](/docs/cluster-management/optimization/trimming-old-data/)
for detailed setup instructions with screenshots.

1. Navigate to the **Trimmer** tab in your cluster dashboard
2. Click **Add Rule**
3. Set a prefix pattern (e.g., `logs-`) that matches your time-series indices
4. Set a size threshold. The oldest matching indices will be pruned when exceeded
5. Enable the rule
   {% end %}

{% toast(type="success") %}Success: Index Trimmer rule is active{% end %}

{% admonition(type="info", title="Note") %}
The Trimmer deletes whole indices only, not individual documents. To remove specific documents within an index, use
the <a href="https://opensearch.org/docs/latest/api-reference/document-apis/bulk/" class="gs-link" target="_blank" rel="noopener">Bulk API</a> with delete actions for efficient batch deletions.
{% end %}

{% gs_code() %}

#### For static indices

Primary shard count is immutable after creation. Plan for growth by choosing an appropriate sharding scheme
upfront - our [sharding guidelines](/blog/ideal-elasticsearch-index/) can help you determine the right configuration.
{% end %}

{% admonition(type="info", title="Need to change shard count?") %}
See [Reducing Shard Usage](/docs/cluster-management/optimization/reducing-shard-usage/)
for step-by-step instructions.
{% end %}

{% end %}

{{ gs_divider() }}

{% gs_next_steps(title="Continue Learning", subtitle="Deepen your understanding of OpenSearch & Elasticsearch best
practices and Bonsai features.") %}
{% gs_next_card(href="/blog/ideal-elasticsearch-index/", title="The Ideal Elasticsearch Index", icon="file", link_text="
Read guide") %}
Foundational guide covering sharding strategies, replication, and capacity planning.
{% end %}
{% gs_next_card(href="/docs/platform/shard-primer/", title="Shard
Primer", icon="grid", link_text="Learn more") %}
Visual guide to understanding how shards and replicas work together.
{% end %}
{% gs_next_card(href="
/docs/cluster-management/optimization/reducing-shard-usage/", title="
Reducing Shard Usage", icon="trending", link_text="Optimize now") %}
Practical techniques to optimize shard count and stay within plan limits.
{% end %}
{% gs_next_card(href="
/docs/cluster-management/optimization/trimming-old-data/", title="Trimming
Old Data", icon="trash", link_text="Set up trimmer") %}
Configure automated index cleanup for time-series data.
{% end %}
{% end %}
