Technology restrictions
Edit on GitHubSome actions, parts of the website, or the entire website are slow.
Cause
A possible cause is technology restriction.
Solution
Before using some technology, you need to understand all its advantages and disadvantages.
A good example is Redis. It is fast, but if used incorrectly, it can lead to performance degradation. If we search against *
or Wildkey
in Redis with a large DB, we get the following results:
NewRelic—DB:
NewRelic—Breakdown:
As you can see, the Redis keys take most of the time. Therefore, they need optimization. You can optimize them by updating your functionality to use exact keys instead of *
.
In the code, this would look similar to this line:
$this->storageClient->getKeys(self::RESOURCE . ':*');
Thank you!
For submitting the form