can I request admin api in high concurrency? #7234
-
can I request admin api in high concurrency?, eg:request to create 100 kong routes at the same time |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can but that what happens depends on lots of factors. If you are using declarative config, then the answer is no, since declarative config's Admin API is read-only. You must load all entities "in one go". When using a database, if some of those routes collide, the first one which gets processed wins. Due to the way Nginx processes requests, this doesn't necessarily mean that the request which arrived first will be fully processed first (for example, if the database is busy and takes a bit longer than usual to respond, the Nginx worker might move on to another request). So the end result might vary randomly, for the same amount of updates, in case there are collisions, even if they were received in the same order. |
Beta Was this translation helpful? Give feedback.
You can but that what happens depends on lots of factors.
If you are using declarative config, then the answer is no, since declarative config's Admin API is read-only. You must load all entities "in one go".
When using a database, if some of those routes collide, the first one which gets processed wins. Due to the way Nginx processes requests, this doesn't necessarily mean that the request which arrived first will be fully processed first (for example, if the database is busy and takes a bit longer than usual to respond, the Nginx worker might move on to another request). So the end result might vary randomly, for the same amount of updates, in case there are collisions, even if they wer…