You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "ranxuxin (via GitHub)" <gi...@apache.org> on 2023/04/11 08:32:30 UTC

[GitHub] [apisix] ranxuxin commented on pull request #9265: (new) avoid creating the whole radixtree while changing one route

ranxuxin commented on PR #9265:
URL: https://github.com/apache/apisix/pull/9265#issuecomment-1502909007

   I tested apisix-2.9 and the improved version again. 
   machine:   8core  2GHz    32G memory,    apisix worker auto
   wrk -c1000 -d60s -t8 --latency --timeout=15s  http://www.aaabbb1122.com:9080/123
   update one route every 0.5 second. And more than 10 thousand routes exist in apisix.
   
   - apisix 2.9 improved version:
   
   ![image](https://user-images.githubusercontent.com/33952968/231100555-5ec58521-f271-4fd6-8b74-47e222147c60.png)
   
   
   the elapsed time of dealing with updating one route:
   
   ![image](https://user-images.githubusercontent.com/33952968/231100657-4c818c14-0548-4df6-ac5a-211e048c0e3f.png)
   
   
   
   - apisix 2.9 original version:
   
   ![image](https://user-images.githubusercontent.com/33952968/231100804-a8026031-bdeb-4802-bfd5-9d4f199881f3.png)
   
   
   
   
   the elapsed time of dealing with updating one route:
   
   ![image](https://user-images.githubusercontent.com/33952968/231101004-dc88649d-7b61-41be-9fbc-f934b881dcec.png)
   
   
   
   conclusion:
   From the test between apisix 2.9 improved version and original version, the improved version has much better performance during dealing with update route requests. The reason is that the improved version only find and update the updated route in radixtree and lua hash table. By comparison, the original version creates the whole radixtree when updating one route. The influence is amplified when large amount of routes exist in apisix.   
   
   
   
   
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org