Page History
Blueriq can be used in a hosting environment where high availability reliability is a requirement. This article will talk about the why, the when and the how of setting up Blueriq services in with aforementioned requirements in mind.
Why to Use Failover
Let's first explore how Blueriq approaches the topic of high availability.
With Blueriq your end users are using a Blueriq application that was designed in our design environment and it runs on a Blueriq Runtime instance. May it be a simple forms application, several webservices to an entire case management system. All of these Blueriq projects will be hosted and will be running through a Blueriq Runtime.
Why to Use Failover (Scalability vs. Availability vs. Reliability)
...
Let's first explore how Blueriq approaches the topic of high reliability. At this moment in time we decided to focus on reliability over availability and scalability, but without limiting the option to make your setup more available and/or scalable.
Let's look at some problems:
- When a runtime instance has any kind of downtime; maintenance or unforeseen issues, your Blueriq application will naturally not be available anymore. This can become a real problem when you want to minimize downtime on your online services.
- Blueriq by its nature is a stateful information system, meaning each end-user using your Blueriq application will have a session that is stored server side. These session are classically stored inside server memory and would be lost if the server goes down.
- Your application might also be under heavy load on certain peak times, making it important to have enough capacity in your infrastructure to accommodate all these users with sufficient performance and responsiveness.
Problem 1 would require a solution that increases availability during downtimes.
Problem 2 would need some way to increase reliability of user sessions when system failures and maintenance windows.
Problem 3 would want some way of running multiple instances of the same type concurrently. This is often called vertical scalability.
There It should be noted that there is a difference between a highly scalable, available system and a scalable reliable system, although there can be some overlap as in making a system highly available might also make it more scalable or more reliable. The key difference is that in a highly available reliable environment the focus is on retaining state when something goes down whether it is planned or not. With Blueriq this mainly means we keep sessions available even when Blueriq services go offline. When we are talking about creating a scalable environment it would not be necessary to focus on retaining user sessions. This is because a session can be running fine inside a single online service for its whole active time. You could theoretically start as many other instances of a Blueriq service as you need and have all of them manage there own sessions entirely in system memory without much trouble in context of scalability.
This way of managing sessions is called "sticky sessions" and it is the main obstacle in Blueriqs architecture in making it failover readyManaging sessions entirely in memory is one of the obstacles too overcome in the architecture of Blueriq in making it more reliable, but not in making it more scalable or available. Retaining user sessions is also one of the most important things in a Blueriq application since users might be in the middle of handling case work or filling out extensive forms and they would lose all their progress if the system is not sufficiently reliable in retaining their progress on moments of downtime.
Too make Therefore making your Blueriq stack highly available and user session data safe, reliable we made Blueriq services store their state in external high performance data storesdata stores, in our case Redis. This way the components of Blueriq that have session management can be setup in a failover cluster, therefore enabling redundancythus making your Blueriq stack more resilient against downtime.
When to Use Failover (What fits your requirements?)
Blueriq usually runs in an environment with multiple other hosted applications. The documentation about the subject failover is primarily meant to advise on when and how to use failover. We offer certain functionality and it is up to the professionals implementing the solution too make the decisions on how to use functionality in this solution. How does Blueriq fit in your infrastructure? What technical requirements do you have as a team and organization?
Consider the following when planning your hosting environment setup:
- Is session data loss something that must be prevented on downtime?
- Do you have high availability requirements (I.E. >99% uptimes) with your customers/partners?
- Do you want to update/release Blueriq services/models with newer versions while minimizing downtime?*
Enablers for this are :
- Are you running inside a Cloud(like) environment?
- Are you running inside a containerized (Docker or other) environment?
If any of these questions are answered with a "yes" you might want to consider setting things up in a failover configuration. As explained before a failover configuration is best at increasing reliability, but can help you scale or become more available too.
Setting Blueriq up with failover support does also bring some downsides that could mean it is no longer worth it:
...
* Switching to newer major versions of Blueriq components might still require you to have downtime.
How to Use Failover (Clustering Runtimes)
Setting up Blueriq to support failover scenarios requires you to set up clusters of your Blueriq services.
...