什么是终端点发现?

huangapple go评论85阅读模式
英文:

What is Endpoint Discovery?

问题

我一直在使用AWS的.NET Core SDK通过DynamoDb。最近我注意到有异常提醒说AWS_ENABLE_ENDPOINT_DISCOVERY环境变量没有设置 - 这些异常被AWS代码捕获,没有明显的功能影响。

我打算将这个环境变量设置为false,因为我相信这将带来性能提升,但有人可以解释一下Endpoint Discovery是什么吗?

供参考:https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L527

这导致了https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/EndpointDiscoveryEnabled.cs

英文:

I've been using DynamoDb on AWS via the .NET Core SDK. I recently noticed exceptions complaining that the AWS_ENABLE_ENDPOINT_DISCOVERY environment variable hadn't been set - they are caught in the AWS code and there is not a noticeable functional impact.

I'm going to set this environment variable to false as I believe it will bring with it a performance boost, but can somebody please explain what Endpoint Discovery is?

For reference: https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L527

which leads to https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/EndpointDiscoveryEnabled.cs

答案1

得分: 2

Endpoint Discovery 是一个过程,其中访问特定的 URL(“发现端点”),该 URL 返回用于使用系统的端点目录。其他代码可以查询该目录以找到访问各种资源的特定 URL。这允许服务主机根据需要更改其 URL,而不会干扰客户端使用这些服务的能力。

来自 Google 的 API 文档

发现文档描述了特定版本的 API 的表面。发现文档提供的信息包括 API 级别的属性,如 API 描述、资源模式、身份验证范围和方法。

发现文档通常是 JSON 或 XML,可以具有任何结构。一旦创建,发现文档的结构就不能更改,否则会干扰客户端。只能更新端点的值。

通常是可选的使用 Endpoint Discovery,但您应该知道服务端点可能会随时间而变化,破坏您的代码。使用 Endpoint Discovery 意味着您的代码将自动更新到新的端点。

英文:

Endpoint Discovery is the process where a specific URL (the "discovery endpoint") is accessed, which returns a directory of endpoints for using the system. Other code can interrogate that directory to find the specific URLs for accessing various resources. This allows the service host to change its URLs as needed without interfering with their client's ability to use those services.

From Google's API docs:

> The Discovery Document describes the surface for a particular version of an API. The information provided by the discovery document includes API-level properties such as an API description, resource schemas, authentication scopes, and methods.

The discovery document is usually JSON or XML, and can have any structure. Once created, the discovery document's struture can't change, otherwise it would interfere with clients. Only the values of the endpoints can be updated.

Using Endpoint Discovery is usually optional, but you should be aware that service endpoints can change over time, breaking your code. Using Endpoint Discovery means that your code will automatically update to the new endpoints.

huangapple
  • 本文由 发表于 2020年1月4日 01:06:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/59582540.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定