Hi All
We are testing TYK v4.3.4 and verifying some rate limiting scenarios in DRL scheme.
Setup Details:
Number of TYK nodes : 3 (distributed load in round-robin fashion)
VM Conf : 4 CPU, 8GB RAM
Following are the observations:
Number of APIs - 2
Case 1
Rate Limit - 30 tps in both APIs
Result - Both APIs gave success response upto 30 calls each and getting failed on 31st call.
Case 2
Rate Limit - 30 tps in 1st API, 20 tps in 2nd API
Result - 1st API gave all success responses but in 2nd API 18 calls were success and 2 calls were failing.
Case 3
Rate Limit - 30 tps in 1st API, 21 tps in 2nd API
Result - APIs are giving intermittently errors for 1 or 2 calls. Sometimes 1st API gives 1 error out of 30 and sometimes 2nd API gives 1-2 errors.
Understanding: We think that in case 2, 20 is not getting equally distributed in all 3 TYK nodes i.e. 20/3 = 6.66 which might be distributing 6 in each TYK node summing up it to 18 success calls as in result.
But in case 3, both rate-limit numbers (30, 21) can be evenly distributed in all 3 TYK nodes then also it is failing 1-2 calls.
In DRL (Leaky Bucket Algo), we expect 1-2 calls extra in success but here scenario is opposite i.e. 1-2 are failing.
Can anyone please guide here on how DRL is working.
Thanks!