Session Manager in Lake: The Key to High Availability

The Session Manager routes requests from the client application to the Primary Cluster in VantageCloud Lake. i.e., it is between the user and the Primary Cluster.

Teradata designed the Session Manager to provide users with an additional high-availability layer. The reason is that the Session Manager minimises the impact of planned and unplanned outages on the workload running on the Lake instances.

I will explain in this post how the Session Manager behaves if an outage happens, as well as the Blue-Green Upgrades and the Micro-Upgrades.

Incidentally, you have a summary of the critical VantageCloud Lake elements and the basis for using them in the post VantageCloud Lake in a Nutshell (it includes an infographic).

Planned Maintenance and Unplanned Outages

When there is an unexpected failure or a planned maintenance that affects a Lake instance:

  1. The active sessions will remain connected to the Session Manager, even if they disconnect from the database due to a restart.
  2. Clients will experience a pause.
  3. Once the database is back online, the Session Manager re-establishes the sessions with the database and replays all sessions’ DDLs and DMLs. I.e., the Session Manager automatically restarts all in-flight statements.
  4. The Session Manager triggers an API for planned maintenance to drain all queries.

Blue-Green Upgrades

The Blue-Green Upgrades allow for almost zero downtime, so they minimise disruptions caused by significant changes to software and hardware. For example, the below updates and changes in the configuration are implemented through Blue-Green Upgrades:

  • Operating System-level security updates to all components at the same time.
  • Changes in the number of Primary Cluster nodes, i.e. expanding or reducing the number of nodes.
  • Changes in the instance size of the Primary Cluster nodes, e.g. from Small T-shirt size to medium or large.

It is important to realise that before scaling out and in, you should open a Change Request to Teradata to request a configuration change.

On a separate note, the diagram below illustrates how Teradata performs a Blue-Green Upgrade in a Lake instance.

Teradata VantageCloud Lake - Blue Green Upgrade
Blue-Green deployment

During a Blue-Green Upgrade, Teradata replaces an existing Lake instance, the Blue one, with a Green instance to upgrade the Blue instance’s software or hardware configuration.

First, Teradata deploys the Green Lake service with the latest software or changes in the service’s components. Afterwards, they copy the data and the configuration from the Blue to the Green service. In the meantime, the users can still access the Blue instance.

Later, after validating that the Green instance has the appropriate data, configuration, software and components, the Session Manager transparently switches users to the Green Lake service. Consequently, Teradata can shut down Blue service first and then decommission it later. So, there is no interruption to the user sessions.

This high-availability technique lets you keep the Lake service up-to-date with minimal impact on the business.

Micro-upgrades

However, if a Lake instance has a vast Primary Cluster, the Blue-Green Upgrade won’t provide the agility required for an upgrade. Sometimes, it is because the Cloud Service Provider may not have enough resources when needed; in others, the data in BFS is extensive, and the backup operations in a Blue-Green Upgrade may become too slow.

So, a Micro-Upgrade will be used when a Lake instance has such a large Primary Cluster. This procedure directly updates the existing system without creating a parallel one by upgrading the nodes via Root Disk swap.

Consequently, the micro-upgrade overrides the existing installation with a newer version, retaining the configuration data and settings from the previous version while minimising downtime.

Note that during a Micro-Upgrade, the block storage data is untouched, and the Session Manager pauses user sessions.​

Finally, if an upgrade requires data dictionary changes or sysinit, then a Blue-Green upgrade will be used instead.

Teradata VantageCloud Lake - Micro-upgrade
Micro-Upgrade

To Know More

The orange book VantageCloud Lake Architecture explains in detail in section 2.5, High Availability, how the Session Manager works and behaves in case of planned and unplanned outages and the blue-green upgrades.


I updated this post with the link to the post VantageCloud Lake in a Nutshell on 10 December 2023.

On 24 February 2024, I amended this post to include the Micro-upgrades.

I modified this post on 30 July 2024 to include a link to the post Impact of Scaling in VantageCloud Lake.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *