Baoyuantop opened a new pull request, #13236:
URL: https://github.com/apache/apisix/pull/13236

   ### Description
   
   All other discovery modules (tars, kubernetes, consul) restrict service data 
fetching to the privileged agent process only. The nacos module was missing 
this restriction, causing every worker process to independently start timers 
and fetch from nacos servers.
   
   This results in:
   - N worker processes × redundant nacos API requests
   - N × unnecessary JSON encoding/decoding overhead
   - Unnecessary load on nacos servers
   
   This PR adds the same `process.type() ~= "privileged agent"` check used by 
other discovery modules, so only the privileged agent fetches from nacos while 
workers read from the shared dict populated by the agent.
   
   **Reference**: This is a minimal fix extracted from the optimization 
discussed in #12867, adapted to the current codebase.
   
   #### Which issue(s) this PR fixes:
   
   Related to #12867
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to