Plan Task Design Considerations

Source: Internet
Author: User

October 29, 2014 09:51:10

Scenario: record user login information logs. In order not to affect the speed of game opening, use the queue to record logs

Each time you execute a scheduled task, the program that records logs is executed for 500 times, that is, the login information of 500 users is recorded.

In this way, the frequency of the output queue is involved.

First, the number of outgoing queues in a day must be greater than the number of incoming Queues: 30 thousand users log on every day, so the outbound queue (log writing) speed cannot be less than 30 thousand/day

Second, a scheduled task is executed multiple times in a day. The operations performed for each scheduled task must be within the scope of the server, if the server that records logs can respond to 10 thousand user visits per second,

Therefore, ensure that the number of scheduled tasks is far smaller than this value each time, because the server must provide other services, or use a dedicated server to execute the queue tasks.

Third, the inbound Queue (user login) is uneven. for example, if there are few logins at night and there are more logins during the day; if there are fewer logins during other daily periods and there are more logins during the activity period, make sure that the total number of outgoing queues can be greater than the total number of user logon outbreaks.

 

Plan Task Design Considerations

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.