Snowflake Admin Series: Redirecting Client Connections

In this blog we are going to see another hot topic from the Admin series, Redirecting Client Connections. This feature is available to Business Critical Edition (or higher)

and just now moved to GA.

How much relevant this topic is with respect to certification exam?

Since this is previewing feature it will not come to any certification exam. But in future it will be one of important topic in Architect/Administration certification.

What is Client Redirect?

A very nice definition from Snowflake documentation which says

“Client redirect is implemented in Snowflake using Snowflake Connection object. The connection object stores a secure connection URL that you use with a Snowflake client to connect to Snowflake”.

The hostname in the connection URL is composed of your organization name and the connection object name in addition to a common domain name:

<organization_name>-<connection_name>.snowflakecomputing.com

Use case for using Client Redirect feature?

Suppose you have multi region organization setup wherein all your account are hosted at different region and cloud provider.

Assume you are connecting to your primary account using one of the below client application using <account_locator>.<region>.<provider> URL. Let's assume we are using SnowSQL for our scenario. Below are the client and their supported version for Client Redirect feature.

Now assumes that due to some reason your primary account goes down and Snowflake Admin from your account has failover to Secondary 1 Account.

Now all your client application connecting to Primary account , will now connect to Secondary 1 account using secondary account URL which means you have to now change your URL connection details in every client application in your organization. Also, bear this in mind that this is not one time change which you can ignore, but it may happen every time your admin do failover to another account.

Sounds like a pain ? Yes it was but not anymore, thanks to Snowflake for releasing this most awaited feature. Soon to be in GA.

This is not a new invention which we are visualizing today, but it was not available in snowflake previously and which was making customer to push this logic to client application layer to check active connection and use healthy connection behind the scene.

Now It's going to be very straight forward using it directly as out-of-the-box feature from snowflake with common connection URL.

What should be the Desired Architecture to look like for this setup?

How about a quick demo on this?

How to verify the connection URL used by your users ?

We can query the LOGIN_HISTORY , LOGIN_HISTORY_BY_USER family of table functions to view the login activity for your users within the last 7 days.

Look at below highlighted column, I had connected to my snowflake account via with & without using connection object. If you see below Connection column value from Login_history table function than you can see the difference that when I connected using connection object the name of connection is logged while it remain null for all connect where I had connected directly to account using <account_locator>.<region>.<provider>

Things to remember(Source Snowflake):

  • This feature is available on Business Critical(or higher) edition only.
  • This feature is implemented using the Snowflake Connection object.
  • Enabling this feature requires that the Organizations feature must also be enabled on your accounts.
  • By default, this feature is not open to all. Contact Snowflake Support to enable the Client Redirect feature on your accounts.
  • Account admin role is required for setup Client Redirect feature.
  • Configuring the DNS CNAME Record for Private Connectivity to the Snowflake Service.
  • There are few limitations to this feature at the moment.See Snowflake documentation for more details. It will eventually lift in due course as this featured is matured.

Hope this blog helps you to get insight into the Snowflake Admin Series. Feel free to ask a question in the comment section if you have any doubts regarding this. Give a clap if you like the blog. Stay connected to see many more such cool stuff. Thanks for your support.

You Can Find Me:

Subscribe to my YouTube Channel: https://www.youtube.com/c/RajivGuptaEverydayLearning

Follow me on Medium: https://rajivgupta780184.medium.com/

Follow me on Twitter: https://twitter.com/RAJIVGUPTA780

Connect with me in LinkedIn: https://www.linkedin.com/in/rajiv-gupta-618b0228/

#Keep learning #Keep Sharing #Everyday Learning.

--

--