4

Upon going through the documentation of `kong' api gateway, there's concept called slots in upstream servers. I did't get the meaning of that. Please share the knowledge of that.

mohan08p
  • 5,002
  • 1
  • 28
  • 36
pandiaraj
  • 580
  • 1
  • 6
  • 18

1 Answers1

0

I have taken a look on the Kong source code, and this is relative to an external resty lib:

https://github.com/Kong/lua-resty-dns-client/blob/c25166d25bb2b5cbdc2e3fa9cb4d5d510f69a2c1/src/resty/dns/balancer/round_robin.lua#L86

Several slots are created into a ring, and based on weight distributed on the slots (~10000 default value). Then a pointer is incremented to find a peer to use.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Ôrel
  • 7,044
  • 3
  • 27
  • 46