Skip to content

v5.4.0

Choose a tag to compare

@bolshakov bolshakov released this 23 Oct 10:32
· 143 commits to main since this release

Stoplight v5.4.0

Major Performance Improvement

Replaced array-based time-series storage with a hash-based sliding window implementation in the Memory data store, delivering significant performance improvement.

  • Before: O(n) array traversal on every metrics query
  • After: O(1) amortized hash lookups
  • Benchmark: 94,276 iterations/sec vs. 312 iterations/sec (60s window, 5min runtime)

This change enables Stoplight to handle high-throughput scenarios with minimal overhead when using in-memory storage.

Automatic Redis Failover

Circuit breakers now automatically fail over to an in-memory data store when Redis becomes unavailable, maintaining full functionality during outages.

  • Zero-latency failover once circuits open (no Redis timeout delays)
  • Full failure tracking and state transitions continue
  • Automatic recovery when Redis reconnects
  • Protected services remain protected during infrastructure issues

Improved Exception Context

RedLight exceptions now expose cool_off_time and recovery_scheduled_after properties, for better integration with monitoring tools and job processors like Sidekiq.

What's Changed

  • Implement automatic failover to in-memory data store when Redis is unavailable by @bolshakov in #448
  • The Rails generator now includes error notifier configuration out of the box by @bolshakov in #452
  • Validate traffic recovery compatibility when calling Light#with by @bolshakov in #454
  • Timestamp metrics at recording time, not event time by @bolshakov in #471
  • Fix traffic control setup docs by @Lokideos in #483
  • Expose cool_off_time and recovery_scheduled_after on Light properties in exceptions by @Lokideos in #484
  • Replace array-based metrics with hash-based sliding window for O(1) performance by @bolshakov in #479

⚠️ Upgrade Notes

  • New validation may surface previously silent configuration errors in traffic recovery settings

Full Changelog: v5.3.8...v5.4.0