for 7 characters short URL, we can serve 62^7 ~= 3500 billion URLs.allows us to use the combination of characters and numbers which contains A-Z, a-z, 0–9 total( 26 + 26 + 10 = 62).Use some hashing techniques like Base62 or MD5.Think about the reads and writes that will happen - to decide what kind of database (RDBMS or NoSQL) to use. Total of 2.031KB per shortened URL entry in the database. Short URL size: 17 Bytes for 17 character Think about the different columns or attributes that will be stored in our database and calculate the storage of data for five yearsĬonsider average long URL size of 2KB ie for 2048 characters. Understand how much data we might have to insert in our system. These characters are a combination of 62 characters something like.We are using 7 characters to generate a short URL.Total records: about 1.8 B records = 30 million * 5 years * 12 months = 1.8B.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |