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
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
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!
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!
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!
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
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.
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 😅
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
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.
@@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
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 !
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.
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.
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.
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?
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.
Good job babe!!!
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
I was literally just looking into this today. Great video, thanks for posting.
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
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!
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!
bro this is exactly what I've been thinking about lately! Thanks so much for making this video!
This is a great practical demo that shows most side projects are going to be okay with simple architectures and low hardware costs
Awesome video. Exactly what I've been researching lately now that I'm moving back to a Laravel monolith from nextjs.
we need a video for deploying MERN Application with AWS and register a domain for that, with best practices for sure :)
+1
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!
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
this was a really good vid, thanks!
This topic has crossed my mind multiple times but i never went ahead & did it.. thanks
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.
super informative video! really enjoyed it
Thanks for the showcase.
(note: Node is not single threaded)
In Node, the code we write is single threaded, but the io under the hood is multi threaded using a thread pool.
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 😅
So what do u propose as a solution ?
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?
yesyesyes
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.
Great and informative video!
Awesome video. Interesting ❤
This was really amazing man. Thank you for what you do. o7
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
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.
@@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
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 !
I’d say allocate 30 min a day to work on your projects. You just need discipline, not motivation. Treat it like a job
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.
Super helpful!
A video do you trying redis ?
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.
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.
What are your thoughts of perf testing between JMeter and k6?
I haven't used k6
Can you use kubernetes and docker on this droplet to scale horizontally with pods?
I think DigitalOcean provides a k8s option, so yes. They also have an app runner which you can specify how many machines
@@WebDevCody Nice, thanks
nice! comm for the algo 👌
super cool!
how to put my app behind a cdn ?
DigitalOcean has an app deploy feature that will deploy your app from GitHub and put behind a cdn
Digital Ocean is ludicrously expensive, you can get a same spec OVH server for more than half the price.
Oh a thumbnail 😄
Does the cheapest plan $4/MO provides a MYSQL Database?
no
@@WebDevCody im new here and i like ur content keep it up!
35/s seems really really low for the small box. Sounds like something isn’t setup correctly.
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?
@@WebDevCody This is definitely an interesting note, I'm curious now how the JMeter puts together that number.
interesting stuff
I host my apps in a 6$ droplet and also use it as a VPN sometimes
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.
digitalocean not vercel
7
Dang, DO is not cheap. Hetzner provides a VM with 2GB RAM for similar price?
Node is not single threaded. It has a v8 engine
Yeah true
@Web Dev Cody =) great for lambda and single thread container, though! Congrats on 100k
Do a test on nodejs api server.
Trying out thumbnails, huh?
Yeah just seeing how it works
happy to hear my cody onlyfans side project will do just fine