Your SlideShare is downloading. ×
0
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
The story about cache
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

The story about cache

882

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
882
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. The Story About Cache charsyam@naver.com
  • 2. Use Case: Login
  • 3. Use Case: LoginCommon Case
  • 4. Use Case: Login Common Case Read From DBSelect * from Users where id=‘charsyam’;
  • 5. Use Case: LoginMay be it’s genenallyfast
  • 6. Use Case: LoginBut it’s SlowIn Many Read/Write
  • 7. Use Case: Login Advanced Case Read From CacheGet charsyam
  • 8. Use Case: Loginit’s always fast
  • 9. Use Case: LoginMemcache VS Mysql 136 vs 1613 seconds
  • 10. Use Case: Login250 million User ID Request 10 million
  • 11. Where We Can Use Cache?Just Check User exists? Mail Receive, Tweet MentionGet User’s ProfileGet User’s Timeline
  • 12. CachesMemcache Redis
  • 13. MemcacheAtomic Operation
  • 14. MemcacheAtomic Operation Key:Value
  • 15. MemcacheAtomic Operation Key:Value Single Thread
  • 16. Memcache Processing Over 100,000 TPS
  • 17. RedisKey:Value
  • 18. RedisKey:Value Collection List Sorted Set
  • 19. Cache Layer Storage Layer Cache Application READ WRITE Server UPDATE WRITE DBMS
  • 20. Cache Layer Like Twitter K: UserID, V: Y/N 1st Level Cache Check User exists K: UserID_TIMELINE, V: Tweet IDs 2nd Level Cache Check tweet list K: UserID_TWEETID, V: Tweet Contents 3rd Level Cache Check Content
  • 21. BUTsSometimes Cache is slower than DB
  • 22. Why?DBMS Also Uses CacheIf Cache is hit. It’s faster than …
  • 23. DBMS Storage Layer Application READ Cache Server DBMS WRITE
  • 24. EnvironmentSmall Data SetsRead Just 0.2~03mili
  • 25. ComparisionDB’s Cache: 0.2milimemCache: 0.4mili If you check cache, you spend more time
  • 26. BUTs BUTsCache helps to reduceDBMS’s Loads And It reduces Performance Deviation
  • 27. Use Cache!
  • 28. Thank you!

×