Cache penetration and cache avalanche

Source: Internet
Author: User

1.Cache penetration:Query a data that does not exist. For example, to query an article table with a nonexistent ID, the database is accessed every time. If someone maliciously destroys the ID, it is likely to directly affect the database.

Solution: all the parameters that may be queried are stored in hash format. Check the parameters at the control layer first. If the parameters do not match, they are discarded.

2. cache failure:If the cache fails for a period of time, the pressure on the database is highlighted. There is no perfect solution, but we can analyze user behavior and try to make the failure time point evenly distributed.

 

-- See programmer magazine 2011.8 p48

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.