System design : pastebin.com

About pastebin.com

User can paste or write or store text for the specific period of time and the same content can be accessed / shared via a unique URL. Idea behind this system is that people should be able to share large amount of text online in simple and convenient manner with other people.

Functional requirements

  1. User should be allowed to paste their content and paste should be accessible via unique URL.
  2. Registered users can edit or delete their paste
  3. Paste would be removed from the system after 1 year. / Paste URL would be expired after 1 year of period.
Read More

Caching

Introduction

Caches take advantage of the locality of reference principle: recently requested data is likely to be requested again. A cache is like short-term memory: it has a limited amount of space, but is typically faster than the original data source and contains the most recently accessed items. Caches can exist at all levels in architecture, but are often found at the level nearest to the front end where they are implemented to return data quickly without taxing downstream levels.

Read More