Performance in Clockspring is usually shaped by the systems your flow interacts with. Databases, APIs, and file storage each have their own limits, and good flow design accounts for those limits early. This article outlines patterns that keep flows predictable and efficient.
1. Understand the External Throughput Window
Before tuning processors, understand the rough capacity of the system you’re calling:
Requests per second
Rows per batch
File read or write throughput
Clockspring can generally operate faster than those systems, so your flow should be shaped around their constraints.
2. Working With Databases
Use batch-oriented processors when possible
Database operations are most efficient when grouped:
Use RecordReader/RecordWriter processors
Send records in batches through PutDatabaseRecord
Adjust batch sizes based on commit time and workload patterns
This reduces round trips and produces steadier throughput.
Keep SQL predictable
Query performance has a direct impact on flow speed. When building DB-backed flows:
Keep queries scoped to the columns you need
Make sure the tables involved have appropriate indexes
Align your queries with the way the database is structured
The goal is not to “fix SQL,” but to make sure the database and the flow are working with the same expectations.
Fit concurrency to DB capacity
Databases handle concurrent operations well up to a point. Past that, performance can flatten or decline. A practical approach:
Start with low to moderate concurrency
Monitor database CPU, wait times, and connection usage
Increase only if the database has clear room to handle more load
The flow should follow the capacity curve of the database, not fight it.
3. Working With APIs
APIs commonly enforce limits on request rate or concurrent calls.
Match flow rate to the API’s comfort zone
Examples:
For an API that reliably handles 120 calls per minute, set InvokeHTTP to a 0.5 second schedule with a single task
Increase concurrency only if the API can tolerate more load consistently
This leads to fewer retries, fewer errors, and more predictable behavior.
Design for latency and variability
APIs can have fluctuating response times. To keep your flow stable:
Use reasonable retry intervals
Avoid rapid-fire retries
Expect occasional slow responses and design schedules that absorb that variability
Flows perform best when they move at the pace the API is built for.
4. Working With File Storage
File systems behave differently based on network, disk type, and workload.
Watch for:
Slow read/write operations
Large numbers of small files
Latency on network-mounted storage
Patterns that improve performance
Write fewer files when possible
Keep heavy transforms localized if the storage is a bottleneck
Run simple throughput tests from the Clockspring server to confirm actual speeds
These checks help you design flows that match the storage layer’s strengths instead of tripping over its weaknesses.
5. Tune the Flow to the System, Not the Other Way Around
Trying to push harder rarely helps when the external system is already at capacity. A better approach:
Find the realistic throughput of the external system
Set Clockspring concurrency and scheduling to stay within that range
Use queues and back pressure to manage spikes
This keeps the system stable and prevents overload cycles.
6. Practical Tuning Checklist
When diagnosing slow performance:
Benchmark the external system directly
Measure operation time (query duration, API latency, file IO speed)
Adjust concurrency and scheduling based on those numbers
Use back pressure to keep queues under control
Use batching where it fits the workload
This gives you a grounded way to tune flows without guesswork.
Key Takeaways
External systems define the upper limit of integration throughput
Batch operations create steadier database performance
API-driven flows should follow the API’s expected rate
File storage throughput should be validated from the Clockspring host
Throughput grows when flows are matched to the real capacity of the systems they call
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article