Thoughts: common architecture attention to points of network services


Thoughts: common architecture attention point in the network services
with multi-threaded add queues to provide network services of the server-side architecture, an important indicator of the processing power of its server is QPS, the impact of the index has two core elements, is a thread pool setting (usually set to 2 times the number of nuclear machine logic can then transfer large little sense), the size of the queue "cache" tasks should also be reasonable to set the queue is too long also does not make sense, in conjunction with the end be able to accept calls and the maximum duration of tolerance, in addition to a core factor is the maximum processing a single task long (to ensure that the duration of a single task to satisfy lower number (thread pool thread a certain situation requires anticipation of QPS's), longer than if a task processing expected nor maximum, to timely interrupt execution, the quick return (returns an empty result also, because it is "overtime"), thus optimizing direction, then it can reduce time-consuming to ponder, such as cache can cache as much as possible, to change space time space for time, and the evaluation function algorithm, as set up the evaluation function, and then to think in that direction And analysis

Guess you like

Origin www.cnblogs.com/big1987/p/11319434.html