gpt4 book ai didi

amazon-ec2 - Amazon ELB自动运行状况检查有什么作用,它期望什么?

转载 作者:行者123 更新时间:2023-12-03 12:09:29 25 4
gpt4 key购买 nike

这是东西:

  • 我们已经实现了C++ RESTful API服务器,它具有内置的HTTP解析器,并且没有标准的HTTP服务器,例如apache或
  • 它已经在Amazon结构中使用了几个月,同时使用普通通信和SSL通信,并且尚未发现与Amazon基础结构
  • 相关的问题
  • 我们正在使用Amazon ELB部署我们的第一个后端
  • here 表示,Amazon ELB具有可自定义的运行状况检查系统,但也可以自动运行
  • 我们尚未找到运行状况检查系统
  • 发送哪些数据的文档
  • 后端简单卡在套接字读取指令上,最终,连接已关闭

  • 我没有在寻找问题的解决方案,因为后端不是基于标准的Web服务器,就好像有人知道ELB运行状况检查系统正在发送哪种消息一样,因为我们没有找到与此相关的文档,任何地方。

    非常感谢您的帮助。谢谢。

    最佳答案

    Amazon ELB has a customizable health check system but also as an automatic one, as stated here



    通过可定制,您大概是指可通过AWS管理控制台(请参阅 Configure Health Check Settings)或API(请参阅 ConfigureHealthCheck)配置的运行状况检查。

    HealthCheck数据类型文档的“目标”字段概述了通过这种方式配置的运行状况检查的要求:

    Specifies the instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.

    Note

    • TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case a healthcheck simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.

    • SSL is also specified as SSL: port pair, for example, SSL:5000.

    • For HTTP or HTTPS protocol, the situation is different. You have to include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy.

    • The total length of the HTTP ping target needs to be 1024 16-bit Unicode characters or less.

    [emphasis mine]



    对于自动模式,大概是指 Why is the health check URL different from the URL displayed in API and Console?中的原因一节中描述的运行状况检查:

    In addition to the health check you configure for your load balancer, a second health check is performed by the service to protect against potential side-effects caused by instances being terminated without being deregistered. To perform this check, the load balancer opens a TCP connection on the same port that the health check is configured to use, and then closes the connection after the health check is completed. [emphasis mine]



    解决方案段落在此处澄清了有效负载为零的情况,即,它类似于上面针对可配置的运行状况检查所述的非HTTP / HTTPS方法:

    This extra health check does not affect the performance of your application because it is not sending any data to your back-end instances. You cannot disable or turn off this health check.



    摘要/解决方案

    假设带有内置HTTP解析器的RESTful API Server实际上确实仅服务于HTTP,则您将需要处理两个运行状况检查:
  • 您将自己配置为HTTP:port; /; PathToPing的第一个用户-您将收到HTTP GET请求,并且必须在指定的超时时间内以200 OK应答才能被认为是健康的。
  • 服务自动配置的第二个-它将在上面配置的HTTP端口上打开TCP连接,不发送任何数据,然后在运行状况检查完成后关闭连接。

  • 总之,看来您的服务器可能已经表现良好,并且您对第二次健康检查的行为感到恼火-ELB真的认为您的服务器不健康吗?

    关于amazon-ec2 - Amazon ELB自动运行状况检查有什么作用,它期望什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10138723/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com