Тёмный

How to make your Node.js API 5x faster! 

Adventures in Nodeland - Matteo Collina
Подписаться 4 тыс.
Просмотров 10 тыс.
50% 1

In this video I demostrate how to use the github.com/mco... module to increase the req/s of Platformatic DB by 5x, while reducing the latency to 1/3. Amazing? You can implement it too!

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@programmer-network
@programmer-network 11 месяцев назад
Thank you, Matteo. Will try to implement this in my programmer network Fastify API. Cheers man
@JuliusGrybauskas
@JuliusGrybauskas 11 месяцев назад
Always happy to see these videos!
@adventuresinnodeland
@adventuresinnodeland 9 месяцев назад
More to come!
@alexenax1109
@alexenax1109 6 месяцев назад
Great new module!
@ankit8268
@ankit8268 8 месяцев назад
But you don't have just one api in your web app, if there are 100 apis how many will overlap, moreover the input to the query also need to be same for this to work right, this can decrease the performance as well. Isn't it?
@ted3309
@ted3309 11 месяцев назад
Good video! Also, can you point or say where you're looking at when you're using "htop" or other fancy tools, because It's hard to follow when you see a tool for the first time.
@adventuresinnodeland
@adventuresinnodeland 11 месяцев назад
Good tip!
@jurajzovinec
@jurajzovinec 11 месяцев назад
Thanks for share this is nice video, still watching videos regarding evolving of Platformtic DB, can't wait to find a project allowing me to my hands on it :) Have you also thought of cache invalidation? Something like creating "relationships" between queries and mutations saying "Hey, if this mutation is running with this movie ID, clear query related object from cache"
@adventuresinnodeland
@adventuresinnodeland 11 месяцев назад
It’s in the roadmap and supported by async-cache-dedupe, we just need to wire it with Platformatic DB.
@VasuRangpariya
@VasuRangpariya 7 месяцев назад
Hey Matteo Collina I have one question which package should we use for caching API. should we need to use async-cache-dedupe or fastify-caching ? because both packages ends up with cahcing data into redis or any in-mem cache
@adventuresinnodeland
@adventuresinnodeland 7 месяцев назад
the latter is lower level and will deduplicate requests.
@VasuRangpariya
@VasuRangpariya 7 месяцев назад
@@adventuresinnodeland I am not getting can you please describe I am bit confused and by the way you guys are doing great work
@adventuresinnodeland
@adventuresinnodeland 7 месяцев назад
@@VasuRangpariya use async-cache-dedupe
@timibolu
@timibolu 11 месяцев назад
thanks mattteo for this
@khanhney
@khanhney 11 месяцев назад
Nice video, Thank you so much
@adventuresinnodeland
@adventuresinnodeland 9 месяцев назад
Thank you too
@minhhieple6483
@minhhieple6483 11 месяцев назад
Thank you so much, One question, So we should use cache in every query to database, right ?
@adventuresinnodeland
@adventuresinnodeland 11 месяцев назад
Yes, at least for the one that fetched data.
@notaspectator
@notaspectator 11 месяцев назад
definitely not, choose wisely based on profiling and db stats ideally during stage testing
@cx1260
@cx1260 2 месяца назад
wow
@codewithnws3544
@codewithnws3544 11 месяцев назад
Can we have the link to the repo of that platformic db's github repo or access to the code !
@adventuresinnodeland
@adventuresinnodeland 11 месяцев назад
Here is the file I’m showing in the video github.com/platformatic/platformatic/blob/main/packages/sql-mapper/lib/cache.js
@admiralicic
@admiralicic 8 месяцев назад
Hit the Like in advance, thank you Matteo!
@alirezanqp
@alirezanqp 11 месяцев назад
Thanks
@tusharbarate4973
@tusharbarate4973 6 месяцев назад
Does this only work with promise.all? How about if I send same request out of promise.all? will that also return from cache ?
Далее
Приключения Node.js в продакшене
39:12
How to Setup Redis Caching in Node
26:20
Просмотров 3,3 тыс.
Scaling your Node.js app using the "cluster" module
13:44
Разрушаем мифы про Node.js
1:36:18
Просмотров 15 тыс.
How Node.js v22.5.0 Broke (Almost) Every Package
10:46
The Hidden Cost Of GraphQL And NodeJS
28:35
Просмотров 193 тыс.