90.6k views
0 votes
You are designing a web application that stores static assets in an amazon simple storage service (s3) bucket. you expect this bucket to immediately receive over 150 put requests per second. what should you do to ensure optimal performance?

User Rrichter
by
5.9k points

1 Answer

1 vote
The answer is adding a random prefix to the key names. One way to introduce randomness to key names is to add hash string as prefix to the key name. for example, you can compute an MD5 hash of the character sequence that you plan to assign as the key name. from the hash, pick a specific number of characters and add then as the prefix to the key name. The casualness of the prefix more consistently distributes key names through multiple index partitions.
User Olaf Horstmann
by
6.7k points