Can the cheapest $4 VM host a next app?

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • sharing ways to load test a service using jmeter, and giving better insight into how much traffic a basic VM can actually handle.
    📘 T3 Stack Tutorial: 1017897100294....
    🤖 SaaS I'm Building: www.icongenera...
    💬 Discord: / discord
    🔔 Newsletter: newsletter.web...
    📁 GitHub: github.com/web...
    📺 Twitch: / webdevcody
    🤖 Website: webdevcody.com
    🐦 Twitter: / webdevcody

Комментарии • 67

  • @SeibertSwirl
    @SeibertSwirl Год назад +31

    Good job babe!!!

  • @amershboul9107
    @amershboul9107 Год назад +2

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

  • @yousafwazir3167
    @yousafwazir3167 Год назад +1

    A video do you trying redis ?

  • @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.

  • @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!

  • @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

  • @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?

  • @chinochao
    @chinochao 11 месяцев назад

    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.

  • @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.

  • @REAZNx
    @REAZNx Год назад

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

  • @proevilz
    @proevilz Год назад

    this was a really good vid, thanks!

  • @DaviAreias
    @DaviAreias Год назад

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

  • @andreim6342
    @andreim6342 Год назад +1

    nice! comm for the algo 👌

  • @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.

  • @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

  • @SalvaToroTorus
    @SalvaToroTorus 6 месяцев назад

    interesting stuff

  • @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

  • @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.

  • @rahultech77
    @rahultech77 Год назад

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

  • @senpos
    @senpos Год назад

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

  • @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.

  • @justine_chang39
    @justine_chang39 Год назад

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

  • @aBradAbroad
    @aBradAbroad Год назад

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

  • @andresgutgon
    @andresgutgon Год назад

    Super helpful!

  • @anuragk6722
    @anuragk6722 Год назад

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

  • @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

  • @mzfitness5533
    @mzfitness5533 Год назад

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

  • @Quiqsave
    @Quiqsave Год назад

    super informative video! really enjoyed it

  • @canadianbeast8671
    @canadianbeast8671 Год назад

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

  • @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

  • @fer.barrios
    @fer.barrios Год назад

    Great and informative video!

  • @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 ?

  • @m3mphi5r4r7
    @m3mphi5r4r7 Год назад

    Do a test on nodejs api server.

  • @thalespica
    @thalespica Год назад

    Awesome video. Interesting ❤

  • @rajusharma823
    @rajusharma823 Год назад

    Oh a thumbnail 😄

  • @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.

  • @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.

  • @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.

  • @insensibility
    @insensibility Год назад +2

    Trying out thumbnails, huh?

    • @WebDevCody
      @WebDevCody  Год назад +3

      Yeah just seeing how it works

  • @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

  • @changNoi1337
    @changNoi1337 Год назад

    super cool!

  • @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

  • @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

  • @st-jn2gk
    @st-jn2gk Год назад

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