Scut problems after the online meeting

Source: Internet
Author: User
Tags lua

1. Post-launch big concurrency issues:

                varSEM =NewSemaphore (_accepts, _accepts);  while(true) {SEM. WaitOne ();#pragmaWarning Disable 4014_listener. Getcontextasync (). ContinueWith (Async(t) =                    {                        Try{sem.                            Release (); varCTX =awaitT; awaitProcesslistenercontext (CTX, This); return; }                        Catch(Exception ex) {Tracelog.writeerror ("Http request Unknow error:{0}", ex); }                    });#pragmaWarning Restore 4014                }

This message listens to the code in large concurrency encountered a major problem, regardless of how much initialization of the semaphore, will enter the status of waiting for the message, only a complete acceptance of a message, will release a semaphore. Therefore, especially when a single protocol is large, or the number of concurrent accesses is large, the server will quickly fall into the situation where most semaphores are locked and waiting to receive messages.

The solution is to filter at the message processing stage by not restricting the "establish connection-Receive message";

2.. NET Embedded LUA virtual machine:

Colleagues have written a static battle logic processor with Lua, and it is conceivable that a large number of uses of this processor can lead to a variety of memory usage and GC issues.

Therefore, the Lua virtual machine resources, or to be pooled processing, for resource management.

3. Scut to receive full messages, logical processing, send full message timeout control is missing, this will be due to the user's unstable message delivery, the wrong logic code causes the resource to be occupied, must be time-out control of the various stages, to prevent the resource is occupied for a long time.

4. The Scut Protocol section, in addition to the general protocol, supports appending more messages, separating them with their delimited delimiter, but instead of specifying the starting index of the append message directly in the header, instead of the string matching method, it is used to find the delimiter in the packet size. String matching can consume more performance.

Scut problems after the online meeting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.