App Background programming

Source: Internet
Author: User

Limit the number of times a client accesses an interface within one minute

1, the device's unique identity to get this actually IOS7 after the problem, permissions have been recovered, Android can
2. Unique identification can be differentiated by generating a token
3, the frequency per minute can be set key-->value key=token+ hours, value= access times + +, but if this is set, you need to manually write the program to clear the current minutes before the data
4, in accordance with 3 of the way, to the Redis, using the Redis cache failure time to control the dimension of the minute, Key=token, value=inc++,expire=6000, the number of times than the specified frequency to throw the corresponding message on the line, this may be better

App Background programming

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.