Data replication
Flush rules
Control how often Artie loads data into your destination with flush rules, balancing performance, latency and resource usage.
Flushing Flushing is the process of loading buffered data from memory into your destination database. runs in a cycle of three stages for every table in a pipeline.
How flushing works
Data buffering
- Artie’s reader reads changes from your source database and publishes them to Kafka.
- Artie’s writer reads the messages from Kafka and holds them in memory, one buffer per table.
- The buffer keeps one row per primary key or unique index.
- Repeated changes to the same row merge into one row, which reduces write volume.
Flush trigger evaluation
- Artie checks three conditions that you control.
- Artie checks changed records and batch size each time a change enters a buffer.
- A timer checks time elapsed on the interval you set.
- When any condition is met, Artie flushes.
- Reading from Kafka pauses during the flush.
Data loading
- Artie writes the buffered rows to your destination as one batch.
- After the write succeeds, Artie commits the Kafka offset and resumes reading.
Artie also flushes before a condition is met if the pipeline reaches a memory limit that Artie sets. These flushes show as memory in the Flush count chart on the Analytics page.
The timer skips a table that already flushed during the last 75% of the interval. With a time elapsed of 1 minute or less, it skips a table that flushed during the whole interval.
Conditions
Any one of these three conditions triggers a flush. The last column is the name each one has in the Flush count chart.
| Condition | What it measures | Flush count name |
|---|---|---|
| Time elapsed | How long Artie waits before writing, even when few changes come in | time |
| Changed records | Number of unique rows (by primary key or unique index) waiting to be written | rows |
| Batch size | Approximate size of those rows after deduplication | size |
Artie measures changed records and batch size per table, so a limit of 1M changed records applies to each table’s buffer.
Set flush rules
Flush rules apply to every destination except Kafka. For a Kafka destination, Artie publishes changes straight to your topics, and the setting doesn’t appear.
On Snowflake, Snowflake eco mode replaces these limits with its own during the off-peak hours of its schedule.
Choose a preset
Three presets set all three limits at once. A new pipeline starts on Balanced, which the pipeline page lists as Balanced (Artie default).
| Preset | Time elapsed | Changed records | Batch size |
|---|---|---|---|
| Balanced | 3 min | 1M | 125 MB |
| Start sooner | 30 sec | 500K | 50 MB |
| Write less often | 15 min | 1M | 125 MB |
Lower limits start each write sooner and send more frequent writes to your destination. To pick limits for your destination type, see Tuning flush rules.
Set custom limits
Choose Custom to set each limit yourself, within these ranges:
| Limit | Minimum | Maximum |
|---|---|---|
| Time elapsed | 5 seconds | 24 hours |
| Changed records | 5 | None |
| Batch size | 1 KB | 1.5 GB |
Artie deploys a time elapsed under 10 seconds as 10 seconds. It deploys a batch size of 100 KB or less as 125 MB.
Set flush rules on a new pipeline
In the setup flow, open Review and deploy. Under Delivery, set Flush timing to a preset or Custom. Artie saves the change as soon as you make it.
If New pipeline opens the Create a new pipeline form instead, Artie then opens the new pipeline’s settings page. Set flush rules there on the tab that starts with Destination, as in Change flush rules on a deployed pipeline.
Change flush rules on a deployed pipeline
Open the pipeline's settings
Open your pipeline and select Edit pipeline.
Open the Destination tab
Select the tab that starts with Destination, for example Destination: Snowflake.
Pick the limits
Under Flush rules, set Preset to a preset or Custom.
Deploy the change
Select Deploy. The new limits take effect after the pipeline deploys.
Related
- Tuning flush rules: limits by destination type, and how to debug high latency
- Force flush: a flush at least every 30 seconds for 2 hours, without editing your flush rules
- Analytics: the Flush count and Flush time charts
Was this page helpful?
- Need help? Message us on Slack or email [email protected].
- Want a walkthrough? Book a demo.
- LLM? Read llms.txt.