NEST 7 Against ES 8 Compatibility Mode Question

@stephenb Hello. We are in the process of upgrading ES to 8.x. Our code is still using NEST 7.x. We have been testing using NEST 7.x against ES 8.x and do not see any issues so far. We have tried with compatibly mode "turned on" and without it. We are unable to see a difference. We were wondering if there was a list of functionality which compatibility mode is needed for? What exactly is the difference and why should we use it?

1 Like

Hi @Sarah_McQueary Welcome to the community.

In general, we do not encourage @ing people that have not already joined your topic

In this case, I am not a .NET expert so I would not know the answer to this question anyways. :slight_smile:

Let's see if someone who is , will answer. I ping internally lets see what happens.

If I were to guess, it is mostly around security that is described at the top of the page.

Connecting to Elasticsearch v8.x using the v7.17.x client

We recommend using the latest client with a corresponding major version when connecting to Elasticsearch. Until the v8 .NET client is generally available, you may use the v7.17.x client to communicate with a 8.x Elasticsearch cluster. There are several important considerations regarding configuration. Failure to correctly configure the client to connect using the security features enabled on the server will result in an exception being thrown during the initial client communication that will prevent further use of the client.

Security and Certificates

Newly installed Elasticsearch v8 clusters start with security configuration enabled automatically by default. As a result, a certificate authority and certificate is created for secure HTTPS communication. Additionally, an elastic user is created with a unique, secure password. Elasticsearch logs details of the security configuration when it first starts, enabling the collection of a certificate fingerprint, along with the password configured for the elastic user. In a development environment, you will need to collect these pieces of information, required to configure the client to securely communicate with the server. The Elasticsearch documentation provides commands which may also be used to retrieve this information after the cluster has started.

@Sarah_McQueary Hi there!

Compatibility mode is mainly a server side feature. The client sends a special versioning header which instructs the server to answer in a 7.x compatible format instead of using the latest 8.x format.

This is important if there was any breaking change in the REST API (e.g. response field a changed type from string to bool or something). You don't gain access to additional features by enabling compatibility mode (NEST does not support the new 8.x features at all).

I'll highly recommend enabling compatibility mode when using the NEST 7.x client to connect to a ES 8.x cluster even if you don't see a difference right now.

2 Likes

Sorry for the mention. Thank you for your help.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.