Scaling Memcache @Facebook
Sunil Gudivada
????Engineering @ Microsoft | Building System Design Studio | Ex - Oracle
???????? ??: ?????????????? ???????????????? ???? ???????? ( ???????????????? )
To accelerate your career as a high-growth engineer, it’s essential to immerse yourself in cutting-edge research articles and engineering blogs from reputable companies. This practice not only broadens your knowledge base but also keeps you updated with the latest industry trends and technological advancements.?
????????????????’?? ???????? ?????? ???????????? ???? ?? ?????? ?????????? ?????? ???????? ???????????? ?????? ???????????????????? ???? ?????????????? ???????????????? ???? ?????????????? ?????????? ?????????????? ???????? ????????. ???????? ?????????? ?????????????? ?????????? ?????????? ????????????'?? ????????????, ?????? ???????????????????????? ???????? ??????, ?????? ?????? ???????? ?????????? ?????????????? ????????????????. ?????? ??????????????, ???????? ?????????????????? ???????????????????? ???????? ???????????????? ???? ???????????????????? ???????? ?????? ???????????????????? ???? ???????????? ???????? ????????????????????????. ???????????????? ?????????? ?????????? ???????????????????? ?????? ?????????? ???? ?? ???????????? ?????????????????????????? ???? ?????? ???? ?????????? ?????? ???????????????? ??????????-?????????? ?????????????????????? ??????????????.
???????????????????????? ???? ??????????????????:
?????????? ??????????????????: To mitigate the "thundering herd" problem, a lease mechanism is used. When a cache miss occurs, a lease token is assigned to one server, preventing multiple servers from simultaneously querying the backend database.
???????????????? ???????? ??????????????????: This helps in better memory management by reducing fragmentation and optimizing memory allocation for different sizes of data.
???????????????? ?????????????????????? ?????? ?????????? ????????:
???????????????? ?????? ????????????????: These tools are used to ensure data consistency across different regions by broadcasting invalidations whenever the data is updated in the database.
?????????????????????? ?????? ????????????????????????: SQL statements modifying data include the required cache keys, ensuring that updates are propagated to all relevant caches.
?????????????? ????????????????????:
???????????????? ????????????????: Splitting servers into regional clusters reduces latency and improves reliability by keeping data closer to users and mitigating the effects of large-scale outages.
领英推荐
?????????????????? ?????????? ?????? ?????????????????? ???????? ??????????: Assigning different pools to different types of data based on access patterns and memory requirements prevents negative interactions and optimizes performance.
???????? ?????????????????? ?????? ?????????????? ????????????????:
???????????? ??????????????: These are used as fallback when primary memcached servers fail, preventing cascading failures that can overload the system.
?????????????????????? ???????? ????????????????: Read requests are distributed across multiple replicas to balance the load and improve performance.
?????????????????????? ????????????????????????:
???????????????? ????????????????: Utilizing Least Recently Used (LRU) eviction policies within each slab class ensures efficient memory use by discarding the least used items first.
???????? ????????????????????????: The design incorporates mechanisms to handle server failures gracefully, ensuring high availability and reliability of the caching system.
???????? ?????? ?????? ???????????????????????? ?????????????????? ???? ?????? ????????????.
??????????://??????.????????????.??????/????????????????????/????????13/??????????????????-????????????????/????????????????????????/????????????????
This research article is still in progress. Will write another article part 2...