Closed wangfakang closed 8 years ago
@wangfakang
First:
It should be no problem. If there is some problem, it is a bug.
Second:
Yes. See the block below about details.
@cubicdaiya Thank you for your prompt response. Use lock way may be have a certain influence on its performance. In a other way each worker copy upstream memory may be performance good but waste of memory.
@wangfakang
Use lock way may be have a certain influence on its performance.
The lock is not a panacea. But I believe it is the better approach in this case.
In a other way each worker copy upstream memory may be performance good but waste of memory.
Unfortunately, the approach above does not have no way to update upstreams for all worker porcesses at a time.
@cubicdaiya Oh, i see. Thank you for your detailed explanation.
I think there may be some problems here. 'ngx_http_upstream_get_round_robin_peer' will get pointer to sockaddr in peer . When we remove server, connection refered to this server will get a wild pointer to sockaddr. Lock is useless. @wangfakang @cubicdaiya
Hi @cubicdaiya Fisrst: I have some questions about ngx_dynamic_upstream_op_remove functions that call op_remove function at the time there are a lot of request using the backend server(may be keepalive) , as the old request end will do some thing for the server but the server has been removed. So this time will be no problem? what do you thank may be Im wrong.
Second: When we operate Shared memory should be locked ?
Thank you.