In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Friends who have come into contact with api services know that there is a limit to the number of api calls per day. So, if the actual business requirements need to frequently obtain the data returned by api, there are duplicate requests and non-duplicate requests. How to solve this problem?
As shown in the figure:
Train of thought:
Check cache first, and the result will be returned immediately.
Caching the query does not get the result, only then querying the database. The result from the database is returned immediately, and the cache is updated at the same time.
The database does not look up many results before calling API to get the data and return the results. At this point, you will also write to the database and update the cache.
Advantages:
Use the cache mechanism for fast response (except for the first visitor)
Reduce the pressure on the database.
Do not repeat the api call data service.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.