kong网关dbless模式

生产环境中网关基本上是固定的,为了减少对数据库的依赖,防止当数据库宕机时网关不能使用,所以使用了kong的dbless模式来部署网关

添加服务配置文件放到/etc/kong/service.yml 

_format_version: "1.1"
services:
- name: pcb-mes
  url: http://svc-pcb 
  path: /
  plugins:
  - name: cors
  routes:
  - name: pcb
    paths:
    - /mes-pcb
    methods: ["POST","GET","OPTIONS"]
    preserve_host: true

 然后重启kong就可以

 
原文地址:https://www.cnblogs.com/lidezhen/p/13122010.html