Cache penetration ConceptAccess to a nonexistent key, the cache does not work, the request will penetrate into the DB, when the traffic is large, the db will be hung off.Solution SolutionsUsing the bitmap filter, a large enough to store the key that may be accessed, the nonexistent key is filtered directly;Access key does not query the value in db, also writes null values to the cache, but can set a shorter expiration time.Cache Avalanche ConceptA lar
Cache avalancheThe cache avalanche may be because the data is not loaded into the cache, or the cache is invalidated by a large area at the same time, causing all requests to go to the database, causing the database CPU and memory load to be too high, or even downtime.Solution Ideas:1, using the lock count, or use a reasonable number of queues to avoid cache failure when the database caused too much pressure. This approach can alleviate the pressure o
Cache avalancheThe cache avalanche may be because the data is not loaded into the cache, or the cache is invalidated by a large area at the same time, causing all requests to go to the database, causing the database CPU and memory load to be too high, or even downtime.Solution Ideas:1, using the lock count, or use a reasonable number of queues to avoid cache failure when the database caused too much pressure. This approach can alleviate the pressure o
The cache Avalanche Cache Avalanche is due to the original cache invalidation (expired) and the new cache is not in the period. All requests to query the database, and the database CPU and memory caused great pressure, serious will cause database downtime. Thus forming a series of chain reaction, causing the whole system collapse.
(1) In this case, the general concurrency is not particularly high time, the
cache penetration : Usually the cache is based on key to find value, if the cache does not exist, then go to the db to find, if found, the Key->value write to the cache. However, for some of the data that does not exist in the cache each time to find, so every time to find in DB, DB can not find so can't write cache, so reciprocating, then lost the meaning of the cache.
WORKAROUND: The query is empty to db, but the cache expiration time of this data need to be set to a little bit; all possible
Since distributed systems make different types of services, in one system 1, different services may be called, such as services A, B, C,
and the service and service will also call each other, such as service D, E will invoke service A;
When service a fails to be invoked, System 1, Service D, and service e fail, resulting in a service avalanche due to a service problem that causes multiple systems or services to be unavailable.
Therefore, a fuse is p
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:
We used to have deep reverence for the words printed on paper. We once looked at experts and believed in authoritative institutions.
The day before yesterday, I was playing a healthy TV program on the TV, saying that if there is a cross on the palm
optimization of e-commerce website can not be separated from the stress test of simulating real environment. And think Bollen communication is the expert in this field. In recent years, Si Bollen based on Avalanche e-commerce website testing solution has been for many customers to complete this aspect of testing, such as: A telecommunications operator Hospital line system, a well-known large-scale video portal product booking/snapping system, an auth
Spring Cloud (iv): Service-tolerant Protection Hystrix "version Finchley" Posted in 2018-04-15 | updated on 2018-05-07 | In a distributed system, it is often the case that a basic service is unavailable, causing the entire system to become unusable, a phenomenon known as service avalanche effect. To cope with service avalanches, a common practice is to downgrade the manual service. And the advent of hystrix gives us another option.
Hystr
has updated data a
User A failed to delete cache for data a
User B reads old data that is cached by data a
At this point, the problem of inconsistent data arises.Solution Solutions1. Set the cache's effective time (the simplest scenario)Advantages:
Simple
Easy to operate
Disadvantages:
There will be old data in a short period of time
If the amount of data is too large, the cache time is short, the cache is prone to a large number of failures during a
the expression than the written content rigorous; second, listening to what is not understandable is not easy to find and repeat. So a lot of reading is the key basic work to improve the English level.Some people ask again, don't you recite the words first? Well, I'm the one who hates memorizing words, and how can you push them into the pit of fire? And simply memorizing words is not useful, the words that are remembered in reading are helpful.For example, at the beginning of the GRE word list
rigorous; second, listening to what is not understandable is not easy to find and repeat. So a lot of reading is the key basic work to improve the English level.Some people ask again, don't you recite the words first? Well, I'm the one who hates memorizing words, and how can you push them into the pit of fire? And simply memorizing words is not useful, the words that are remembered in reading are helpful.For example, at the beginning of the GRE word list to find a word
, speaking, and reading.
Why not listen more first? There are two reasons. First, the spoken language is relatively casual, there are many slang dialects, and the expression is not as rigorous as the written content; second, it is not easy to find and repeat what you cannot understand once. Therefore, a large amount of reading is the key basic work to improve the English proficiency.
Someone asked again, don't you memorize words first? Well, I hate memorizing words. How can I push you into the f
Cache consistency IssuesWhen data timeliness requirements are high, you need to ensure that the data in the cache is consistent with the database, and that the data in the cache nodes and replicas must be consistent, and that there is no difference. This is compared to relying on cache expiration and update policies. It is common to proactively update the data in the cache or remove the corresponding cache when the data changes.Caching Concurrency issuesAfter the cache expires, it attempts to ge
is a variant of the avalanche diode (regulator tube)!The characteristic is that the current in the rated working area is very small! The current is greatly increased after overpressure!The difference between a transient suppression diode and a Zener diode is that the former works in the cutoff area!The latter works in the conduction zone!And the pressure-sensitive group is composed of two ends fusible conductive inner sandwich resistance film!Under n
, the Wavelink series high-bandwidth differential probes from the Force branch are representative of this type of probe. 2. Differential probe with high common-mode rejection ratioWhat is the common-mode rejection ratio, in short, is the differential amplifier circuit in the signal common-mode component of the suppression ability, which is defined as the amplifier to the differential mode signal voltage magnification ADM and the common mode signal vo
Directory
Basic concepts of caching
Caching principle
Cache design
A comparison between distributed cache Memcache and Redis
Cache penetration, Cache breakdown, Cache avalanche Solution
Data consistency
Using the built-in MemoryCache
Using Distributed Cache Redis
Use Stackexchange.redis to encapsulate a Redishelper class yourself
Reference
Basic concepts of caching
Cache is an important component
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.