Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Infrastructure guidance for video sharing app.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Infrastructure guidance for video sharing app.

goldhatgoldhat Member
edited August 2017 in Help

Hi all,

I am building an iOS app (and soon on Android and Web) that allows users to watch and share videos - it's different to YouTube in ways not relevant to my question.

It's my first time building a product of my own that will (hopefully) scale - and I don't want to make mistakes in the start with regards to the infrastructure around it.

Here's what I have in mind already - would love it if you guys could critique/make suggestions to it:

Server 1:
- Dedicated server, 6C, 32GB RAM
This is where we will be hosting the PHP code and the MySQL Database

Server 2:
- Dedicated server, 8C, 32GB RAM
This is where videos that are over 480p would be uploaded to to be transcoded to 480p before being sent to S3

AWS S3
Used for storage of all videos

AWS Cloudfront
CDN for delivery of video


Here is the flow of a video that's uploaded by a user on the app:

User > Transcoding Server > S3 > Cloudfront > Mobile App

in the case the video is lower than 480p it would go straight to S3.


What do you guys think? Any way I can optimise this further?

«1

Comments

  • ClouviderClouvider Member, Patron Provider

    You checked the pricing of AWS services right ?

    Thanked by 1Aidan
  • @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

  • You know that AWS Unlimited Storage is soon a thing of the past?

  • TomTom Member

    @Ympker said:
    You know that AWS Unlimited Storage is soon a thing of the past?

    I think he's talking about S3?

  • ClouviderClouvider Member, Patron Provider

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

  • @Clouvider said:

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

    What would you recommend then? I am not looking to spend more than $200 per month as of now when we don't have a lot of users/videos - after some growth we can afford to increase that. But I also don't want to compromise on quality.

  • @Tom said:

    @Ympker said:
    You know that AWS Unlimited Storage is soon a thing of the past?

    I think he's talking about S3?

    Yep

  • ClouviderClouvider Member, Patron Provider
    edited August 2017

    @goldhat said:

    @Clouvider said:

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

    What would you recommend then? I am not looking to spend more than $200 per month as of now when we don't have a lot of users/videos - after some growth we can afford to increase that. But I also don't want to compromise on quality.

    Without self advertising I can recommend CDN.net, for example, which will save you quite a lot every month at Comparable quality

    @OnApp_Terry

  • @goldhat said:

    @Tom said:

    @Ympker said:
    You know that AWS Unlimited Storage is soon a thing of the past?

    I think he's talking about S3?

    Yep

    Ah my bad then :P Just wanted you to know in case you didnt.

    Thanked by 1Tom
  • OnApp_TerryOnApp_Terry Member
    edited August 2017

    @Clouvider said:

    @goldhat said:

    @Clouvider said:

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

    What would you recommend then? I am not looking to spend more than $200 per month as of now when we don't have a lot of users/videos - after some growth we can afford to increase that. But I also don't want to compromise on quality.

    Without self advertising I can recommend CDN.net, for example, which will save you quite a lot every month at Comparable quality

    @OnApp_Terry

    We've been really successful at converting AWS users to CDN.net - mostly due to the fact that we can come it at about 1/4 the price.

    Happy to talk more, but even without commitment we come in at about $.011 per GB compared to Cloudfront at $.085 per GB.

    Thanked by 1Clouvider
  • PUSHR_VictorPUSHR_Victor Member, Host Rep
    edited August 2017

    I agree with others that your bill will be ugly with Amazon, but if your business model supports such costs it's a good decision. Apart from that there is nothing wrong with your idea (maybe I don't understand why the transcoder is only 6 cores, and the other server - 8 cores. Transcoding is very taxing). One thing that does not become clear about the 480p videos - Are you going to transcode them elsewhere, like on the user's device directly? If not, will the videos have their moov atom in the right place so they can be streamed without issues?
    Talking about bandwidth, regardless on what you decide, I strongly suggest you go unmetered. Anything else is a gamble and you may wake up one morning being too popular for your wallet (and if you've done your job right, you most probably will).

  • ClouviderClouvider Member, Patron Provider
    edited August 2017

    @PUSHRcdn so you suggest that he goes unmetered at a budget of 200 USD as a start up ? Seiousely...

  • jhjh Member

    If you do use AWS, their Elastic Transcoder service is waaaaay easier (and might be more cost effective depending on your volume) than renting a large server and trying to get every codec under the sun on it. You don't have to use their CDN or servers but you would need to use S3.

  • PUSHR_VictorPUSHR_Victor Member, Host Rep
    edited August 2017

    @Clouvider said:
    @PUSHRcdn so you suggest that he goes unmetered at a budget if 200 USD as a start up ? Seiousely...

    @Clouvider Absolutely serious.
    It could be 100Mbps unmetered if he is just starting up. He can grow from there without ever worrying about going over budget. If the rest of the infrastructure comes from a low cost provider like OVH, he is well within $200 including the transcoder and even more power than he states he needs.
    That's what 90% of app startups do when they are bootstrapped.

  • @Clouvider said:

    @goldhat said:

    @Clouvider said:

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

    What would you recommend then? I am not looking to spend more than $200 per month as of now when we don't have a lot of users/videos - after some growth we can afford to increase that. But I also don't want to compromise on quality.

    Without self advertising I can recommend CDN.net, for example, which will save you quite a lot every month at Comparable quality

    @OnApp_Terry

    Transferring data then from my S3 to CDN.net would cost me making no diff whether I use cloudfront or cdn.net no?

  • @OnApp_Terry said:

    @Clouvider said:

    @goldhat said:

    @Clouvider said:

    @goldhat said:

    @Clouvider said:
    You checked the pricing of AWS services right ?

    Yes which is why I chose to move my transcoding to a dedicated server since that was the most expensive part of the system.

    You'll need significant revenue stream even if you only had their CDN. AWS is generally quite expensive. There are plenty cheaper alternatives around.

    What would you recommend then? I am not looking to spend more than $200 per month as of now when we don't have a lot of users/videos - after some growth we can afford to increase that. But I also don't want to compromise on quality.

    Without self advertising I can recommend CDN.net, for example, which will save you quite a lot every month at Comparable quality

    @OnApp_Terry

    We've been really successful at converting AWS users to CDN.net - mostly due to the fact that we can come it at about 1/4 the price.

    Happy to talk more, but even without commitment we come in at about $.011 per GB compared to Cloudfront at $.085 per GB.

    Sounds interesting but if we move data out of S3 to CDN.net it would cost me there too

  • @PUSHRcdn said:
    I agree with others that your bill will be ugly with Amazon, but if your business model supports such costs it's a good decision. Apart from that there is nothing wrong with your idea (maybe I don't understand why the transcoder is only 6 cores, and the other server - 8 cores. Transcoding is very taxing). One thing that does not become clear about the 480p videos - Are you going to transcode them elsewhere, like on the user's device directly? If not, will the videos have their moov atom in the right place so they can be streamed without issues?
    Talking about bandwidth, regardless on what you decide, I strongly suggest you go unmetered. Anything else is a gamble and you may wake up one morning being too popular for your wallet (and if you've done your job right, you most probably will).

    As of now I am not looking to spend too much since we are bootstrapped like hell - mistake in the original post, it was supposed to be 8 cores for the transcoding server and 6 for PHP/MySQL. We're going to be transcoding videos when we receiove them from the user and kep only one copy of the video in the 480p resolution (at least that's the plan). What's Moov Atom? Unmetered bandwidth is hard to find lol

  • @jh said:
    If you do use AWS, their Elastic Transcoder service is waaaaay easier (and might be more cost effective depending on your volume) than renting a large server and trying to get every codec under the sun on it. You don't have to use their CDN or servers but you would need to use S3.

    Man AWD elastic transcoder is SO expensive. I did a little budget and that turned out to be the biggest cost.

  • @PUSHRcdn said:

    @Clouvider said:
    @PUSHRcdn so you suggest that he goes unmetered at a budget if 200 USD as a start up ? Seiousely...

    @Clouvider Absolutely serious.
    It could be 100Mbps unmetered if he is just starting up. He can grow from there without ever worrying about going over budget. If the rest of the infrastructure comes from a low cost provider like OVH, he is well within $200 including the transcoder and even more power than he states he needs.
    That's what 90% of app startups do when they are bootstrapped.

    So you recommend unmetered bandwidth for the transcoder for tranferring data to S3?

  • PUSHR_VictorPUSHR_Victor Member, Host Rep
    edited August 2017

    Unmetered is not hard to find, But I am not sure I am allowed to advertise our company.
    MP4 (H264) is the format that almost all smart devices support nowadays, but you need to move the moov atom to the beginning of the video so that it can be streamed progressively without the need to be downloaded in full first and seeking in the timeline will work (Also known as pseudo streaming). FFMPEG (or AVCONV) can do this for you with the +faststart flag upon converting the video. Some of the mobile start ups that we migrated last month came from Amazon with huge bills (especially an alternative Android store which seems to grow fast) which is why I warned about being billed on traffic. With VC funding they usually get good terms for Amazon services (VSs have some affiliate thing I suppose), but when you build this without funding traditional CDN could easily be price prohibitive, especially Amazon, Akamai and the likes.

  • ClouviderClouvider Member, Patron Provider

    @PUSHRcdn for $200 you can barely get Cogent. OVH is hardly quality provider, especially in terms of their network.

    @goldhat I'd recommend that you don't store on S3. You can do storage on the local server and let CDN cache it. No point in being tied up to a single provider.

  • @Clouvider said:
    @PUSHRcdn for $200 you can barely get Cogent. OVH is hardly quality provider, especially in terms of their network.

    @goldhat I'd recommend that you don't store on S3. You can do storage on the local server and let CDN cache it. No point in being tied up to a single provider.

    So you recommend using dedicated servers for everything along with a CDN?

  • ClouviderClouvider Member, Patron Provider

    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

  • @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Got it

  • NuntiusNuntius Member
    edited August 2017

    @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Sorry but that's just not true, I understand your position as you want to sell your dedicated servers but for a startup to operate own storage and than even scale it is bullshit on dedicated servers. I mean where I can get for example a 50 TB storage server for 1,150$ per month?

  • ClouviderClouvider Member, Patron Provider

    @Nuntius said:

    @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Sorry but that's just not true, I understand your position as you want to sell your dedicated servers but for a startup to operate own storage and than even scale it is bullshit on dedicated servers. I mean where I can get for example a 50 TB storage server for 1,150$ per month?

    Not only at AWS. Storage is not everything. With 4x more expensive bandwidth especially.

  • NuntiusNuntius Member
    edited August 2017

    @Clouvider said:

    @Nuntius said:

    @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Sorry but that's just not true, I understand your position as you want to sell your dedicated servers but for a startup to operate own storage and than even scale it is bullshit on dedicated servers. I mean where I can get for example a 50 TB storage server for 1,150$ per month?

    Not only at AWS. Storage is not everything. With 4x more expensive bandwidth especially.

    True but why should he use a dedicated server? Also even with the bandwidth price I don't see a dedicated server a good choice for storage in his case. And even with 50TB traffic where you see 50TB storage with 50TB traffic for cheaper than 1600$?

  • ClouviderClouvider Member, Patron Provider
    edited August 2017

    @Nuntius said:

    @Clouvider said:

    @Nuntius said:

    @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Sorry but that's just not true, I understand your position as you want to sell your dedicated servers but for a startup to operate own storage and than even scale it is bullshit on dedicated servers. I mean where I can get for example a 50 TB storage server for 1,150$ per month?

    Not only at AWS. Storage is not everything. With 4x more expensive bandwidth especially.

    True but why should he use a dedicated server? Also even with the bandwidth price I don't see a dedicated server a good choice for storage in his case.

    I'm not sure you're trolling at the moment. You're comparing AWS with some undefined provider that you arbitrary believe to be more expensive. Even if you looked at our Dedi offer, which we never advertised in this thread, you'd see that on 30TB with LET discount you're at below £0.01 per GB of bandwidth.

    Frankly, 8 cents per GB is a lot. There are plenty offers that are much cheaper. CDN caches the content thus severely reducing the bandwidth needed on the storage server.

  • NuntiusNuntius Member
    edited August 2017

    @Clouvider said:

    @Nuntius said:

    @Clouvider said:

    @Nuntius said:

    @Clouvider said:
    That would be the cheapest way to do it in my opinion, much lighter on your wallet, and much more predictable cost-wise.

    Sorry but that's just not true, I understand your position as you want to sell your dedicated servers but for a startup to operate own storage and than even scale it is bullshit on dedicated servers. I mean where I can get for example a 50 TB storage server for 1,150$ per month?

    Not only at AWS. Storage is not everything. With 4x more expensive bandwidth especially.

    True but why should he use a dedicated server? Also even with the bandwidth price I don't see a dedicated server a good choice for storage in his case.

    I'm not sure you're trolling at the moment. You're comparing AWS with some undefined provider that you arbitrary believe to be more expensive. Even if you looked at our Dedi offer, which we never advertised in this thread, you'd see that on 30TB with LET discount you're at below £0.01 per GB of bandwidth.

    Frankly, 8 cents per GB is a lot. There are plenty offers hat are much cheaper. CDN caches the content thus severely reducing the bandwidth needed on the storage server.

    Yes your bandwidth is cheap but how much should he have to pay for a 50TB disk space with you? And you advertise with every post - because of your signature. That's ok. But don't say you are just posting here for fun. And in the end why should some one trust a one man show when it can have AWS and know they exist even in 10 or 20 years?

  • ClouviderClouvider Member, Patron Provider
    edited August 2017

    You keep shifting those numbers. First you talk about 150 for 1150 now you ask for 50. In the meantime you talk about expensive bandwidth with dedicated, which turns out to be 8 times cheaper. Make a decision.

    What one man show are you talking about ? I can see that since the your actual arguments have been demolished, you're now trying to imply that all AWS competitors are some basement hosts ? Seriously ?

    I am actually, here's me sharing my knowledge to help someone out. Not everything is business. Tying your project to a single ecosystem like Amazon AWS leaves you at their mercy. Shift from AWS in this case may require migration, structural code changes, etc. On top of that it's 8 times more expensive - might be even more in the future - you never know.

    If you're really interested feel free to reach out to us and we'll be happy to quote.

    Thanked by 1lurch
Sign In or Register to comment.