Can the cheapest $4 VM host a next app?

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 67

  • @SeibertSwirl
    @SeibertSwirl ปีที่แล้ว +31

    Good job babe!!!

  • @Kevin-fl4rn
    @Kevin-fl4rn ปีที่แล้ว +2

    Very interesting to see tests like this done from someone who's mostly into frontend only. Would also be interested in a video like you mentioned of adding multiple droplets in a load balence

  • @aBradAbroad
    @aBradAbroad ปีที่แล้ว

    I was literally just looking into this today. Great video, thanks for posting.

  • @joshem32
    @joshem32 ปีที่แล้ว +4

    Awesome video, you don’t get to see this kind of tests very often, I understand Next and Vercel go pretty much together, but it’s good to know there are other options that can actually do the job

  • @lilililliilil
    @lilililliilil ปีที่แล้ว +8

    You always turn topics that I might have been curious about at least once into content. Today, you resolved my curiosity with your precious time! Thank you, Cody!

  • @ChrispyChris3
    @ChrispyChris3 ปีที่แล้ว +2

    Funny you made this because I just recently saw you pop up and I also have been wondering about how much I could push through my cheap Linode VPS as opposed to going with all this serverless stuff people are constantly pushing. I want to learn serverless for sure, but I do love being able to host things myself, whether on VPS or home server! Great content, thanks!

  • @justine_chang39
    @justine_chang39 ปีที่แล้ว

    bro this is exactly what I've been thinking about lately! Thanks so much for making this video!

  • @UnknownIllusionist
    @UnknownIllusionist ปีที่แล้ว

    This is a great practical demo that shows most side projects are going to be okay with simple architectures and low hardware costs

  • @name_less227
    @name_less227 ปีที่แล้ว

    Awesome video. Exactly what I've been researching lately now that I'm moving back to a Laravel monolith from nextjs.

  • @amershboul9107
    @amershboul9107 ปีที่แล้ว +2

    we need a video for deploying MERN Application with AWS and register a domain for that, with best practices for sure :)

    • @zimin8
      @zimin8 ปีที่แล้ว

      +1

  • @richardjamesbunker
    @richardjamesbunker ปีที่แล้ว

    Super informative! Thank you so much! That video really put into perspective the whole "but does it scale?" question because it's not just about the application stack and not just about the server but also the expectation around usage. For a small hobby app that has a small user base, it's clear that the $4 machine is almost - dare I say - overkill if that's even possible! Anyway, great video! And congrats on the 100k subs!

    • @michaelai8274
      @michaelai8274 ปีที่แล้ว

      btw, since most companies are all into data analytics these day, I think every company would pretty much want to dedicate some work to analytics of their user engagement. If there are tools just like the one in this video that can help do these basic checks, I think by the time a company's user base and connections/requests is about to match the threshold the tools give, at that time, they could safely go with scaling.
      In my honestly opinion, I think it could be somewhat better on the pricing side, and btw, not trying to get kicked off a serverless platform is another thing. LoL

  • @proevilz
    @proevilz ปีที่แล้ว

    this was a really good vid, thanks!

  • @anuragk6722
    @anuragk6722 ปีที่แล้ว

    This topic has crossed my mind multiple times but i never went ahead & did it.. thanks

  • @jaany
    @jaany ปีที่แล้ว

    For anyone curious, typically on DO the Premium AMD droplets perform better than Intel for some services. I'd recommend doing some research what may fit yours best if you come into a situation where you're scaling up.

  • @Quiqsave
    @Quiqsave ปีที่แล้ว

    super informative video! really enjoyed it

  • @viktor-dy9tr
    @viktor-dy9tr ปีที่แล้ว +1

    Thanks for the showcase.
    (note: Node is not single threaded)

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว +3

      In Node, the code we write is single threaded, but the io under the hood is multi threaded using a thread pool.

  • @sandervspl
    @sandervspl ปีที่แล้ว

    Careful using pm2 with Nextjs. If you have multiple instances and you use revalidate on GSP, only 1 instance will be revalidated at a time instead of all of them at the same time. The docs say you can use FS instead of memory for revalidated pages, but it is difficult to test if this actually fixes the issue. We’ve had angry clients because of this 😅

    • @ko-Daegu
      @ko-Daegu ปีที่แล้ว

      So what do u propose as a solution ?

  • @SeanCassiere
    @SeanCassiere ปีที่แล้ว +2

    If feasible, could you spin up a db in the same box and see how it buckles under the load of having to form a db connection and a read on page load?

    • @st-jn2gk
      @st-jn2gk ปีที่แล้ว

      yesyesyes

  • @mmzzzmeemee
    @mmzzzmeemee ปีที่แล้ว +2

    Any chance you can do a breakdown of cloudflare pages with a next app?
    I've checked a few videos here on youtube, but haven't found that much.

  • @fer.barrios
    @fer.barrios ปีที่แล้ว

    Great and informative video!

  • @thalespica
    @thalespica ปีที่แล้ว

    Awesome video. Interesting ❤

  • @st-jn2gk
    @st-jn2gk ปีที่แล้ว

    This was really amazing man. Thank you for what you do. o7

  • @amasoharnold4762
    @amasoharnold4762 ปีที่แล้ว +1

    I’ve been recently looking into this too glad you did a video for it
    I guess if there was like a database inside that same vps it might hurt the performance
    Also if it’s just serving HTML and you using node would something like golang or rust be able to utilize resources better and be faster

    • @michaelai8274
      @michaelai8274 ปีที่แล้ว

      I think this is a great idea. I just learnt from this video as well that node is single threaded, no wonder enterprise and big tech have stood with java for the longest times.
      The ones switching or porting over a bit are doing so to Go and Rust as well, especially Go.

    • @amasoharnold4762
      @amasoharnold4762 ปีที่แล้ว

      @@michaelai8274 I'm not particularly certain about the actual version, but I'm pretty sure since node 16 node can do multi-threaded tasks
      They didn't use to have the feature, so it's not really well known and it's a bit different from how other languages that have first-class support for multi treading but it definitely has support for working with multiple threads

  • @ashfordyt
    @ashfordyt ปีที่แล้ว

    I have a weird request but I hope if you could take it into consideration !
    As a development student ( and I'm not that bad at it ) I've been in love with coding since a very young age and I'm a quick learner and all that.
    But lately I've been having some issues with motivation, I find myself not touching code for weeks, leaving personal learning projects hanging, and when I decide to pick up where I left off, I find my brain wiped clean which is even more frustrating and pushes me even further away.
    I want your opinion on how can I deal with such issue, how do I keep myself motivated and stick to a pattern/schedule... How do I stop these long no coding breaks ( for literally no reason other than just not doing it ).
    I see you love what you do and I love that about you and I wish you could make a video for us, learners and students telling us your advice to stay motivated and go even further down the road ! It would really help coming from you as you're my favorite coding youtuber of all time !

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว +2

      I’d say allocate 30 min a day to work on your projects. You just need discipline, not motivation. Treat it like a job

    • @michaelai8274
      @michaelai8274 ปีที่แล้ว +1

      Just as Cody said, some time allocated everyday would help, like 30mins to 1hour. Also, make sure you are not messing up your night, like staying awake. It affects the brain, this from personal experience. Anytime I get a good sleep, I remember usually what I was doing the day before.

  • @andresgutgon
    @andresgutgon ปีที่แล้ว

    Super helpful!

  • @yousafwazir3167
    @yousafwazir3167 ปีที่แล้ว +1

    A video do you trying redis ?

  • @ephotopros
    @ephotopros ปีที่แล้ว

    great video, any idea what the cpu utilization was while doing this? also on AWS the servers usually(?) have a boosted capacity for a minimum amount of time but once you use that up if you continue to have that much traffic it could hurt - but that was a lot of traffic for most of us. My servers never use up the credits for the boosted capacity but it is nice to have it always available.

  • @chinochao
    @chinochao ปีที่แล้ว

    You are doing what a developer might think of doing when they host their own stuff. But as a system engineer or administrator you are missing a lot of things, like looking at your server resources and see where your bottlenecks are, cpu, memory, IO and see where you can improve. Example of adding caching for static content like Nginx, etc.
    A lot of performance can be tweak when you see your server resources and also see where in your code you can also improve to help reduce those resources used.

  • @rahultech77
    @rahultech77 ปีที่แล้ว

    What are your thoughts of perf testing between JMeter and k6?

  • @antonpetrov145
    @antonpetrov145 ปีที่แล้ว

    Can you use kubernetes and docker on this droplet to scale horizontally with pods?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      I think DigitalOcean provides a k8s option, so yes. They also have an app runner which you can specify how many machines

    • @antonpetrov145
      @antonpetrov145 ปีที่แล้ว

      @@WebDevCody Nice, thanks

  • @andreim6342
    @andreim6342 ปีที่แล้ว +1

    nice! comm for the algo 👌

  • @changNoi1337
    @changNoi1337 ปีที่แล้ว

    super cool!

  • @3IMAD69
    @3IMAD69 ปีที่แล้ว

    how to put my app behind a cdn ?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      DigitalOcean has an app deploy feature that will deploy your app from GitHub and put behind a cdn

  • @REAZNx
    @REAZNx ปีที่แล้ว

    Digital Ocean is ludicrously expensive, you can get a same spec OVH server for more than half the price.

  • @rajusharma823
    @rajusharma823 ปีที่แล้ว

    Oh a thumbnail 😄

  • @canadianbeast8671
    @canadianbeast8671 ปีที่แล้ว

    Does the cheapest plan $4/MO provides a MYSQL Database?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      no

    • @canadianbeast8671
      @canadianbeast8671 ปีที่แล้ว

      @@WebDevCody im new here and i like ur content keep it up!

  • @OmgImAlexis
    @OmgImAlexis ปีที่แล้ว

    35/s seems really really low for the small box. Sounds like something isn’t setup correctly.

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      Yeah I think the jmeter actually means the test plan request. So each test plan request does like 12-15 total request each run, so 35 * 15 = 525 request / second?

    • @ChrispyChris3
      @ChrispyChris3 ปีที่แล้ว

      @@WebDevCody This is definitely an interesting note, I'm curious now how the JMeter puts together that number.

  • @SalvaToroTorus
    @SalvaToroTorus 8 หลายเดือนก่อน

    interesting stuff

  • @DaviAreias
    @DaviAreias ปีที่แล้ว

    I host my apps in a 6$ droplet and also use it as a VPN sometimes

  • @louispoirot-hattermann4178
    @louispoirot-hattermann4178 ปีที่แล้ว

    99% of SaaS application need AWS/Versel lowest plan, with CDN and caching system to not blow database. People that use Redis/Memcache seems overkill for me, File Cache is way enough. The only avantage is that you can share your cache with others instancies (but once again 99% of saas will need only one instance and the lowest one) and is it real performance issue to warm-up your file cache for the new instance.

  • @senpos
    @senpos ปีที่แล้ว

    Dang, DO is not cheap. Hetzner provides a VM with 2GB RAM for similar price?

  • @christiantechlead5901
    @christiantechlead5901 ปีที่แล้ว

    Node is not single threaded. It has a v8 engine

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว

      Yeah true

    • @christiantechlead5901
      @christiantechlead5901 ปีที่แล้ว

      @Web Dev Cody =) great for lambda and single thread container, though! Congrats on 100k

  • @m3mphi5r4r7
    @m3mphi5r4r7 ปีที่แล้ว

    Do a test on nodejs api server.

  • @insensibility
    @insensibility ปีที่แล้ว +2

    Trying out thumbnails, huh?

    • @WebDevCody
      @WebDevCody  ปีที่แล้ว +3

      Yeah just seeing how it works

  • @mzfitness5533
    @mzfitness5533 ปีที่แล้ว

    happy to hear my cody onlyfans side project will do just fine