Faster or better designed? Choose any two! by Dmytro Vyazelenko

Explore the trade-offs between performance and design principles in modern systems. Discover how to achieve low latency, reduce memory allocation and improve system efficiency, and learn from real-world examples.

Key takeaways
  • No garbage allocation is a key principle in achieving low latency and reducing allocations in systems.
  • C and Rust based implementations like Agrona can outperform Java-based implementations in certain scenarios.
  • Java’s garbage collector and object-oriented programming model can lead to increased latency and memory allocation.
  • Using custom, low-level, buffer-based APIs can help reduce allocation and improve performance.
  • Avoid using text-oriented protocols like JSON and XML, as they can introduce additional overhead and latency.
  • Batching and concurrency can be used to improve performance, but require careful consideration of thread concurrency and resource contention.
  • On-premises solutions can provide better performance and lower latency than cloud-based solutions, but require careful planning and optimization.
  • Design principles like no garbage allocation, batching, and concurrency can help achieve low latency and high performance in systems.