replicas.cfg 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. global
  2. maxconn 2048
  3. log stdout format raw local0
  4. defaults
  5. log global
  6. option httplog
  7. mode http
  8. timeout connect 2s
  9. timeout client 65s
  10. timeout server 65s
  11. timeout queue 2s
  12. retries 2
  13. retry-on conn-failure
  14. option redispatch 1
  15. frontend platform
  16. bind :8080
  17. default_backend platform_replicas
  18. backend platform_replicas
  19. balance roundrobin
  20. option httpchk GET /health/ready
  21. http-check expect status 200
  22. http-response set-header X-Zhifu-Replica %[srv_name]
  23. server api1 host.docker.internal:18001 check inter 1s fall 2 rise 2
  24. server api2 host.docker.internal:18002 check inter 1s fall 2 rise 2
  25. frontend embeddings
  26. bind :8200
  27. default_backend embedding_replicas
  28. backend embedding_replicas
  29. balance leastconn
  30. option httpchk GET /health/ready
  31. http-check expect status 200
  32. server embedding1 host.docker.internal:8200 check inter 1s fall 2 rise 2
  33. server embedding2 host.docker.internal:8201 check inter 1s fall 2 rise 2
  34. frontend monitoring
  35. bind :8404
  36. http-request use-service prometheus-exporter if { path /metrics }
  37. stats enable
  38. stats uri /stats