4

Basically, I'm about to launch a music streaming app, and I'm trying to figure out cost.

Cloud services like S3 and RackSpace cloud are expensive. As far as scalability is concerned... I'm assumign that an average user listens to music for an hour and lets say our app scales to 100,000's of users. It's about 90MB / hour per user of bandwidth... Let's make another assumption and say that we have an average of 10,000 concurrent users streaming music in a 24 hour period (90MB (avg/hr) * 10k * 24 = 21,600,000MB = ~20.5 TB)... That's a shit load of bandwidth! According to Rackspace's pricing, that's $3,780 USD per day... holllllly crap! Anoher thing, services like Rdio, Grooveshark, etc have roughly 15 million (licensed) songs... If I through that into the mix, that's 15,000,000 * 3MB (avg song) = 43,945GB = $4,300 a month.

So at these rates, companies like Rdio and Grooveshark, etc, in no way pay this much.

So my question is simple... generally, what are some routes to take when creating a streaming service? Being specific would earn my vote! (AKA, links to well rated companies offering cheaper CDN services or unmetered colocation for a flat rate)

Thanks duders!

More)

Application servers will be hosted on Rackspace... but this is somewhat irrelevant considering the fact that I really just need a fast "cdn"

Jordan
  • 392
  • 2
  • 6
  • 17
  • 2
    This doesn't seem to involve code issues. Might be better on [Webmasters](http://webmasters.stackexchange.com/faq) – Andrew Leach Jun 11 '12 at 06:36

4 Answers4

4

Look at accelerating load balancers like jetNEXUS. They are very simple to set up and use techniques like static caching HTML muxing and compression to dramatically reduce the amount of data hitting the actual servers. This can save you a ton of money in bandwidth costs. I think Rackspace has some Zeus or Jetnexus offerings, and I know that it's available as an option on Amazon's Cloud.

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
Phil
  • 41
  • 2
2

There are plenty of of ways to reduce that cost. I know Spotify do the following (among other things):

  1. Cache the songs locally.
  2. Use P2P to download from other clients (they mainly use the server to guarantee low latency).
  3. Only allow high bit-rates for paying users.

I recommend you read the following: http://www.csc.kth.se/~gkreitz/spotify-p2p10/

If you're looking for cheap hosting then I suggest you check out: http://www.hetzner.de/. I haven't used them but I've heard lots good things about them.

Yrlec
  • 3,401
  • 6
  • 39
  • 75
  • Responses to the list: 1) Songs will be cached wherever possible of course 2) P2P would be great.... if the user base wasn't going to be mainly mobile... I don't think spotify uses P2P in their mobile clients. 3) It's mainly a paid service anyway... "free" users will be limited play... and storing many versions of a file would be great, however, noting my costs above, this means storing many more files (thus almost doubling storage costs). When that time comes, we can analyze if it will save money in the long run. :) – Jordan Jun 11 '12 at 06:40
  • 1
    They don't use P2P for mobile clients but they use offline sync for mobile clients. – Yrlec Jun 11 '12 at 06:46
  • Oh, true that. These are def three ways to effectively reduce cost... but still need a cost efficient CDN or data layer. – Jordan Jun 11 '12 at 06:51
  • If you use the same quality as Spotify uses by default then the usage will be ~72mb/h, not 90mb/h. http://www.spotify.com/se/help/faq/tech/codec-quality/ – Yrlec Jun 11 '12 at 07:50
  • Spotify also pauses the music when the user mutes the sound on his/her computer. – Yrlec Jun 11 '12 at 07:51
  • I used Hetzner's dedicated servers for few years already, zero problems, fair prices. – adrianTNT May 17 '15 at 21:30
1

We've been working on reducing the costs for our high volume email delivery service (http://elasticemail.com) which uses a lot of bandwidth and needs to scale. We found that by switching to OVH we could get much more bandwidth and much more hardware for a lot cheaper and they have great API's to automate a lot of the complexities you'd find in a complex infrastructure.

So kudos to OVH (http://ovh.ie) for saving us a lot of money.

Joshua
  • 3,465
  • 3
  • 28
  • 19
  • I +1'd this due to offering a link and experience with them. I'll wait for more responses to see if anything else comes up. Thanks! – Jordan Jun 11 '12 at 06:49
  • We use OVH too (for 50+ servers) and we never found anything cheaper and more robust yet with no monthly bandwidth limit. They now are the 4th largest hoster in the world and they are currently building the world largest data center in Canada (350000+ servers). Support is about OK, but you may want to purchase their VIP package (about 500€/year) for a direct link to one of their techs. – Bruno Grieder Jun 12 '12 at 17:00
1

I know Rackspace cloud files for their CDN (which is included in the price) use Akamai. Akamai don't seem to have any pricing around on the web, but they do seem to be expensive after some googling.

I'd try these things.

  1. Tell Rackspace your plans and ask if they can work out some kind of a bulk deal.
  2. Contact Akamai and tell them about your plans and see what they offer.
  3. Google "cheapest content delivery network" and see what comes up.

I think a CDN is what you want, that'd give you the capacity that you need. I don't think it'd be possible to do that much from a simple VPS or cloud provider without a CDN behind it.

Basically, if you're serving a lot of static content, and you're doing it from cloud servers (vps's) it's gonna clog up your pipes at some point, even if you have a few servers, it'll eventually reach capacity, but with a CDN, all the content is pushed out to the nodes, so it basically goes on and on :)

From my experience, Akamai CDN is awesome. I've used it quite a bit (through RS cloud files) and in like 2 years only hit 2 issues, one was the end user's fault for using some far away dns servers, and the other was fixed in about 1.5 days, where a user was in Italy or somewhere and their content was coming out of some other country.

Akamai uses the geo IP database lookup of the DNS server that requests the url to give you the IP of a host nearby. This works great for most people as they'll use their ISPs DNS servers for doing lookup.

On the plus side, most users get ping times much smaller than if they downloaded it from America, for example in Gold Coast, my ping time to akamai is about 20-50 msecs, to USA it's 250-400 msecs.

Update: After doing some googling myself, this looked promising: http://24ways.org/2008/using-google-app-engine-as-your-own-cdn - they're saying to use google app engine as a CDN. On the plus side, last time I checked you could do that for free, but on the downside, I wouldn't base a business by planning that that would stay free; going by google's history of releasing free things, then later charging for them or dropping them.

matiu
  • 7,469
  • 4
  • 44
  • 48