1

TL;DR : How would you host a scalable backend for a mobile application without cloud (if possible, unless it's by far the best way), keeping it the cheapest way.

I'm about to finish a Mobile App (Android first, later Iphone/Windows) which interacts with a RESTFull Node.JS backend with PostgreSQL behind it. I'm currently using a VPS for dev but then, I'm starting to think about Production. I clearly don't know if my application will be used by only 10 friends or by millions (which at least, is the secret target). Some points :

  • I'm not rich and have a job and a family to watch upon, I clearly don't want to spend lot of money in hosting. Max 300$/month (at least at start) (if application is a disaster, it's a loss I can afford)
  • My app streams content (mp3, pictures, videos) over the network. Most of them will be self hosted. This content should be "streamable", I mean, I can wait 2s-5s for the sound to start, but it should then play without "jumps".
  • I'm clearly afraid of Amazon Cloud since I don't know how much I will earn from the application and I don't want to have a bill of 10K$ if I earn nothing.
  • I know how to have multiple load balanced databases and Node.JS servers, what I've never done is replicating one cluster to another in the world for time access boost.

Questions is : How would you scale an application like this one? Do only one cluster and add databases/NAS and frontend servers matching load progress (solution I'm about to do since it's the only one I know (Amazon AWS appart), but I'm afraid of latence on foreign continents or will you go with multiple location clusters and if so, how will you do it. I mean, I don't see for instance, how you can have one URL (ex: myapplication.com/api/mymethod) to know how to go to the nearest cluster.

What I don't want : - Broken application if there is a buzz and servers can't handle the load. If this happens, users will not use application since it's broken and buzz will fade out quickly. - Unexpected gigantic bill. - Cloud this the best way for this kind of applications. But really, it seems like a black box to me and very expensive once go get traffic.

Thanks for reading!

Battochon
  • 61
  • 3

1 Answers1

0

You can make it scale by moving to a an MBaaS which precisely address all the issues that you described (scalability stress testing is key in MBaaS). Moreover the free tiers offered by most MBaaS providers are quite generous so you won't be paying a dime while your app is not very popular.

Disclaimer: I work for Kii Cloud MBaaS and would recommend that one for it's carrier grade scalability but my comments apply to major MBaaS providers in general

German
  • 10,263
  • 4
  • 40
  • 56