So you’re excited and ready to unlock low-latency microservices. And you’ve chosen Pivotal Cloud Foundry as the foundation for your microservices and digital transformation.
You’ve broken down your monolithic e-commerce application and created a new environment composed of small, independent, single purpose microservices. Time for a well-earned swig of that single malt whiskey you’ve been saving for just the occasion, right? Sorry, not just yet.
Because now you’re watching load and latency increase with spikes in usage—is it Black Friday? User experience is suffering! Messages and transactions are getting lost! You’re not going to meet your SLAs! How and why is this happening?
Microservice architecture patterns and latency challenges
You’re not alone. Many organizations are leveraging microservice architecture patterns to build their next-generation enterprise and deliver business value at a faster pace, but they’re realizing that maintaining responsiveness at scale can be tricky. When it comes to building out low-latency microservices, it’s important to step back and consider what will happen under heavy loads.
Microservices must frequently interact since each one serves a single purpose. The most common way microservices are connected is with REST, but more developers are recognizing the value of using queuing and streaming technologies.
Transforming monolithic applications into microservices does tend to improve organizational agility and scalability, but it is not always a silver bullet—what was an application is now a distributed system, which can introduce unwanted latency.
Back to our Black Friday catastrophe.
Pivotal Cloud Foundry was able to handle the load, so what was the source of this headache? No, it wasn’t the whiskey you were taking a swig of earlier. The source of the problem was RabbitMQ.
A lightly loaded RabbitMQ implementation usually exhibits latency lower than a millisecond per message interaction. But as load increases (for example, a spike in orders or a new product introduction) latency can go up 600 milliseconds. If you assume 10 interactions between microservices as part of each transaction, that’s six seconds!
How to ensure low-latency microservices
A great solution for this problem is to combine the agility and scalability provided by microservices and Pivotal Cloud Foundry with the low (and deterministic) latency of the Solace Hardware Messaging Appliance.
Solace’s appliance utilizes an FPGA hardware data path that ensures latencies of 20 microseconds at any message rate. Best of all, this power can be harnessed using Spring Cloud connectors so that your application is unaware that it is using a service running outside of PCF.
This is done simply by configuring a “User provisioned service” in PCF as shown in this blog entry. This also allows you to get started using our software-based tile offering and switch over to hardware if latency, throughput, or IAAS availability/stability require it—all without expensive and time-consuming code and vendor changes. In fact, did you know there are three ways you can use Solace messaging from your PCF deployment? Check out this blog post to better understand when to use each offering.
We know you want incredible flexibility, and you clearly know your stuff, since you’re all about low-latency microservices and Pivotal Cloud Foundry. By adding Solace to your system you can enjoy your whiskey without worrying about latency or losing those Black Friday orders!
It’ll be a job well done. And something worth a sip or a swig, depending on your style.
NOTE: RabbitMQ performance numbers came from: https://www.rabbitmq.com/blog/2012/04/17/rabbitmq-performance-measurements-part-1/