[NineChap System Design] Class 3.2: Web Service - Shuatiblog.com
Fix step 2, Network error
Problem is: MP3 url invalid. It actually comes from a failed CDN sever.
Solution: fix the server.
Fix step 3, CDN can't find MP3
Problem associated with Anti-Leech.
a leech) is one who benefits, usually deliberately, from others' information or effort but does not offer anything in return.
Example: Wi-Fi leeches, Direct linking (or hot-linking) and In most P2P-networks, leeching is whose who download too much.
Anti-Leech specializes in protecting file downloads and stopping bandwidth leeching.
See that some P2P and leeching software will steal your url links, so the MP3 url expiration time is 5 minutes.
So when CDN server's clock and web server's clock are not synchronized well, MP3 url can expire.
Solution: every 10 minutes sync CDN clock with web server clock.
Fix step 4, Timeout error
Some MP3 are relatively large. Thus timeout.
MP3 performs better at higher bps, and aac(Advanced Audio Coding) works better at lower bps.
Solution:
compress MP3 to 48bps, or use aac format. So, play lower-rate music first, then switch automatically.
pre-load a music while previous is playing.
optimize CDN
CDN content delivery network is a large distributed system of servers deployed in multiple data centers across the Internet.
The goal of a CDN is to serve content to end-users with high availability and high performance.
Read full article from [NineChap System Design] Class 3.2: Web Service - Shuatiblog.com
No comments:
Post a Comment