konga

konga

access konga

konga service

access real service

kong-kong-proxy service

access process

notify_service plugins -> Routes -> notity_service_route /sms, /email -> SERVICES -> UPSTREAMS

  1. 网址 --》 域名解析 --> 域名服务器 ip-a
  2. ip-a把请求路径和参数传递给kong
  3. kong解析、分发请求,从后端拿到数据,然后原路返回
  4. 在routes中,通过域名 + path --> 确定 Service
  5. Service 中也有个path默认等于routes中的path, 当然也可以单独设置,表示真实服务的路径
  6. Service 中可能有jwt验证, 验证通过,然后通过host去找Upstreams
  7. upstreams中有多个targets, 可以做负载均衡,设置weight
  8. target 中有内网服务的地址和端口号

CONNECTIONS

name: kong

type: default

kong admin url: http://host:8001  # kong-kong-admin service

kong version: 1.1.2

kong auth: 

JWT AUTH: {Algorithm: HS256}


CONSUMERS

USERNAME:
CUSTOM_ID:
ACCESSIBLE ROUTES:

PLUGINS

JWT
CORS

Routes

NAME/ID: notify_service_route
SERVICE: notify_service
PATH: /sms, email
protocols: HTTP, HTTPS
Regex priority: 0
Methods:

SERVICES

在service可以配置使用jwt plugins可以控制service是否验证jwt

NAME: notify_service
HOST: notify
PORT: 80
Connection timeout: 60000 # The timeout in milliseconds for establishing a connection to your upstream server. Defaults to 60000
With timeout: 60000
Read timeout: 60000
Path: The path to be used in requests to the upstream server. Empty by default.
Retries: 5

UPSTREAMS

NAME: notify
Details:
Results: 25
Targes: A target is an ip address/hostname with a port that identifies an instance of a backend service. Every upstream can have many targets, and the targets can be dynamically added and removed. So changes are effectuated on the fly.
	{Target: host:port, WIGHT: 100} # notify service

Alerts: Email 

	

你可能感兴趣的:(web)