In 2020, due to the impact of the epidemic, all kinds of live streaming of e-commerce have flooded into people’s eyes, and many businesses sell their products through live streaming.
1. A message must have only one piece of memory that uses Job aggregation messages, referenced by Comet Pointers.
2. As far as possible, a user’s memory is placed on the stack. Memory is created in the corresponding user’s Goroutine (Go program).
3. Memory control is mainly for Comet module optimization, you can view the module’s various memory allocation places, use the memory pool.
Ensure that each Comet communication channel is independent of each other and that message distribution is completely parallel and does not interfere with each other.
2. Concurrency must be controllable every Goroutine (Go coroutine) that needs to be opened for asynchronous processing must have a fixed number created in advance. If this is not controlled in advance, the Goroutine can explode at any time.
3. Global lock must be broken Socket link pool management, user online data management are multiple locks; The number of scatters usually depends on the CPU, and it is often necessary to consider the burden of CPU switching, not the more the better.
The long connection service module is used to verify the user entering the live broadcast room.
1. Adjust the user optimal A-Node
The Svrlist module is used to select the most stable node closest to the user, adjust the IP address segment, and access the node.
2.IDC’s service quality monitoring: call drop rate
3. Flow control