Developers March 25, 2020

Help! What is the best backend setup AWS or Firebase?

makeshiftIndie

I’m working on a music streaming website like soundcloud/spotify, (Javascript, PhP, MYSQL- so i want to start there & can’t go back now). I need the audio to stream quickly. I planned to use my shared hosting to hold the frontend and MYSqL database while Using an aws s3 bucket to store the audio + cloudflare to push the music to the user.

Or should I just use firebase as an s3 bucket while I'm small and let My shared hosting do the rest.

Or should just get a better faster
Shared hosting company and just start there. Any advice would be appreciated. I prefer not to learn the hard way if i don't need to.

  1. 2

    For large amount of data both AWS S3 and Google cloud are expensive, have a look at DO spaces. It's AWS S3 compatible which means you can start with AWS and then switch to DO spaces if you think AWS expensive.

    1. 1

      Thank you for this. I will into DO

  2. 1

    I'm using Firebase and it is pretty easy and cheap.

    1. 1

      Thanks. I will research further.

  3. 1

    Hi There,
    Check out Light Sail - https://aws.amazon.com/lightsail/
    It'll really take your mind off DevOps.
    Cheers,
    Jonathan

    1. 0

      Thanks. I found LightSail isn't really good at all will will cause me issues since it cant easily upgrade to Cloudfront nor Cloudflare if the upgrade is warrantedZ

      1. 1

        In that case, I'd just spin up a marketplace ec2 with LAMP.

        PS you already know javascript, why not ditch PHP for nodeJS?

        PPS If you'd like some advice, I'm doing free 30-min consults now, feel free to book one. https://calendly.com/jonathanoron

  4. 1

    From my experience with AWS the most long term and effective setup would be to host everything in AWS and deploy it using AWS SAM (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html). This way you can deploy your whole stack with API, frontend, database, storage etc in one simple command and you only pay for what you use. Simplest stack would be:

    Frontend: JavaScript app hosted on S3 + CloudFront
    Backend: API Gateway + Lambda
    File storage: S3 + CloudFront

    However, this might take a while to learn so if you have used the services that you mentioned before it might be a better choice. If you use S3 for file storage I would recommend AWS CloudFront as the CDN instead of CloudFlare - easier to have everything in one place.

    1. 1

      Thanks. You are right I researched and found Cloudfront better than Cloudflare. Still comparing it to the others

    2. 1

      Wait in this frontend/backend/file storage stack what acts as the database?

      1. 1

        MYSQL on shared Hosting