英文:
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,而不会干扰客户端使用这些服务的能力。
发现文档描述了特定版本的 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.
> 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论