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
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!
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
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
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.
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.
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.
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 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.
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
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
This is a great practical demo that shows most side projects are going to be okay with simple architectures and low hardware costs
we need a video for deploying MERN Application with AWS and register a domain for that, with best practices for sure :)
+1
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!
I was literally just looking into this today. Great video, thanks for posting.
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!
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
bro this is exactly what I've been thinking about lately! Thanks so much for making this video!
Awesome video. Exactly what I've been researching lately now that I'm moving back to a Laravel monolith from nextjs.
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.
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
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.
This topic has crossed my mind multiple times but i never went ahead & did it.. thanks
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.
this was a really good vid, 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.
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
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.
A video do you trying redis ?
super informative video! really enjoyed it
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 ?
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.
What are your thoughts of perf testing between JMeter and k6?
I haven't used k6
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
Digital Ocean is ludicrously expensive, you can get a same spec OVH server for more than half the price.
Great and informative video!
Super helpful!
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
Awesome video. Interesting ❤
Dang, DO is not cheap. Hetzner provides a VM with 2GB RAM for similar price?
I host my apps in a 6$ droplet and also use it as a VPN sometimes
This was really amazing man. Thank you for what you do. o7
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.
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
nice! comm for the algo 👌
Oh a thumbnail 😄
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
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.
super cool!
interesting stuff
Trying out thumbnails, huh?
Yeah just seeing how it works
happy to hear my cody onlyfans side project will do just fine