Kong关键概念 - Upstreams

Upstream是指Kong Gateway转发请求到的API、应用程序或微服务。在Kong Gateway中,Upstream 对象代表了一个虚拟主机名,并可以用于对多个服务进行健康检查、断路器和负载均衡。

Upstream 和 service 交互

您可以将服务配置为指向一个Upstream,而不是一个主机。例如,如果您有一个名为example_service的服务和一个名为example_upstream的Upstream,您可以将example_service指向example_upstream,而不是指定一个主机。example_upstream Upstream可以指向两个不同的目标:httpbin.org和httpbun.com。在实际环境中,Upstream指向在多个系统上运行的相同服务。

通过这种设置,您可以在Upstream目标之间进行负载均衡。例如,如果应用程序部署在两个不同的服务器或Upstream目标上,Kong Gateway需要在这两个服务器之间进行负载均衡。这样,如果其中一个服务器(如前面示例中的httpbin.org)不可用,它会自动检测到问题,并将所有流量路由到正常工作的服务器(httpbun.com)。

Upstream 配置

您可以使用以下方法将Upstream添加到Kong Gateway的服务中:

  • 使用Kong Manager
  • 使用Admin API
  • 使用decK(YAML)
相关推荐
lwb_011813 小时前
SpringCloud——Gateway新一代网关
spring·spring cloud·gateway
你是人间五月天13 小时前
gateway断言配置详解
gateway
weixin_3875456414 小时前
深入解析 AI Gateway:新一代智能流量控制中枢
人工智能·gateway
yuluo_YX15 天前
AI Gateway 介绍
人工智能·gateway
网硕互联的小客服17 天前
502 Bad Gateway:服务器作为网关或代理时收到无效响应处理方式
运维·服务器·gateway
sevevty-seven18 天前
什么是Gateway
gateway
秋の花18 天前
【GateWay】和权限验证
java·gateway
欧先生^_^19 天前
org.springframework.cloud.gateway 组件解释
gateway
jarenyVO21 天前
Spring Cloud Gateway 全面学习指南
java·gateway
保持学习ing23 天前
微服务--Gateway网关
java·网关·微服务·gateway