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