Hey @themsaid, will choosing a connection pooling package help in eliminating too many connection issue? recently I am facing this issue and not sure what to do?
What about transactions within Laravel Octane? How using single connection affects transactions? And what about MySQL nested transactions emulation with savepoints in that case? Will it lead to any problems?
So many great tips in a single video 🤩 I've used the MySQL replication setup in the past and I was blown away by how simple it was to setup, it is a great fit with the Managed DigitalOcean Databases so you don't have to worry about maintaining the replication yourself which could be very challenging.
I am using multiple connections, is this PDO still working in that situation? Will they have multiple objects also? My concern is that the application should not have to authenticate every time it does a query if the PDO in multiple connections application
Some apps set whole application in read-only mode during the database maintenance or application rollback scenario due to some bug in new version. How to acheive this in Laravel with a single configuration update?
Hi, thanks for the informative video. I have a question regarding something you said. You mentioned that opening new DB connections is considered an expensive operation, I wonder why is this? Lets say you have an app that has a hundred request per second, and inside every request you are accessing the DB 10 times. That means you are opening 1000 connections every second if you were not to use singleton connections. Would that really affect performance in any significant way? The issue with using singleton for connection is that it can cause "Too many connection" issue if you have some lag in some other part of your app, and the question is does it really make any significant difference in performance for most apps out there. Would be nice to have some comparison regarding performance, how much difference it really makes, opening 1000 connections per second vs like 100.
Because on each new connection the server hosting the database need to allocate memory and then deallocates it after closing the connection. The more connections opens & closed the more work the server needs to do. That's why it's expensive. Keeping the connecting open to run multiple queries (or maybe multiple requests) requires less work from the server.
Hi Mohamed, very good content. Do you have any material about use REDIS Cluster scalable at Elasticache as FILE CACHE. We are have throubles with "Moved {IP}" error.
Uh, possibility of choosing read/write connection via config is awesome. nice vid. ( please look up how "instance" is pronounced, it drives me crazy :D )
@@themsaid Sometimes when I watch the video on mobile, the font is too small. But if it's only me, then not a big deal. Keep up the so beautiful work :)
Hey @themsaid, will choosing a connection pooling package help in eliminating too many connection issue? recently I am facing this issue and not sure what to do?
These videos are great... Thank you Mohamed
What about transactions within Laravel Octane? How using single connection affects transactions? And what about MySQL nested transactions emulation with savepoints in that case? Will it lead to any problems?
So many great tips in a single video 🤩
I've used the MySQL replication setup in the past and I was blown away by how simple it was to setup, it is a great fit with the Managed DigitalOcean Databases so you don't have to worry about maintaining the replication yourself which could be very challenging.
Nice! Glad you like the video. I've submitted a PR that might make it even more reliable: github.com/laravel/framework/pull/37567
You guys are on fire! Putting PHP closer to the performance of Java/C# apps
I am using multiple connections, is this PDO still working in that situation?
Will they have multiple objects also?
My concern is that the application should not have to authenticate every time it does a query if the PDO in multiple connections application
Respected Muhammad Said. Please tell me what theme and color scheme you'r using in phpstorm...
Some apps set whole application in read-only mode during the database maintenance or application rollback scenario due to some bug in new version. How to acheive this in Laravel with a single configuration update?
Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Illuminate\Database\MySqlConnection::forgetRecordModificationState()
Your Laravel installation is out of date. Upgrade.
Would appreciate a link to where we can learn how to replicate a database since you've said you won't cover it in the video.
Thanks for this. Good to know everything about Laravel. It help me a lot during development how to customize this and that. Thanks again.
Hi, thanks for the informative video. I have a question regarding something you said. You mentioned that opening new DB connections is considered an expensive operation, I wonder why is this?
Lets say you have an app that has a hundred request per second, and inside every request you are accessing the DB 10 times. That means you are opening 1000 connections every second if you were not to use singleton connections. Would that really affect performance in any significant way?
The issue with using singleton for connection is that it can cause "Too many connection" issue if you have some lag in some other part of your app, and the question is does it really make any significant difference in performance for most apps out there.
Would be nice to have some comparison regarding performance, how much difference it really makes, opening 1000 connections per second vs like 100.
Because on each new connection the server hosting the database need to allocate memory and then deallocates it after closing the connection. The more connections opens & closed the more work the server needs to do. That's why it's expensive.
Keeping the connecting open to run multiple queries (or maybe multiple requests) requires less work from the server.
Hey, I think a nice extra large plant in the corner of your room by the router will look pretty nice there.
ممتاز... بس لو المقدمة يبقى جانبها رسومات توضيحية يبقى افضل بكتير لايصال المعلومة بشكل أفضل
Another point, it would be better if you add laravel version to the video title.
Another Golden resource! Thank you for giving all those gems to the community.
Glad you liked it :)
Dude we need more content from you! These videos are great and cover things no one else covers.
keep it up mohamed . it's my first time to know about the read,write,sticky configuration options
Happy to help ya Ahmed :)
Thanks , we always stay tune for your videos
Hi Mohamed, very good content.
Do you have any material about use REDIS Cluster scalable at Elasticache as FILE CACHE. We are have throubles with "Moved {IP}" error.
Excellent tips, Thank you Mohamed.
Awesome
شكرا جزيلا
would be there any advantages if we have read and write connections available but pointing on the same host?
Sighs. Always learn something new when listening to you. Allah bless you so much Mohamed 🙏🏽
Well Done Mo!
جميل 💪😍
Octane is based on swoole or road runner under the hood. For advanced users, use this for better flexiblity
Thanks! So instructive in a short video!!! 🙏
Glad it was helpful!
You're doing great Mohamed, thanks a lot
Exactly what I wanted to know, thanks.
Thanks, 💕💕 love you,bro
Thanks :)
Man. You started really amazing video series.
I learned 2 new things from this video. Keep it up. 👍👍
Glad you like it! :)
Uh, possibility of choosing read/write connection via config is awesome. nice vid.
( please look up how "instance" is pronounced, it drives me crazy :D )
I think I pronounce it correctly? :D What's wrong with it?
These videos are **gold**
Happy you think so :)
Hi Mohamed, what could be a real world “use-case” for this type of connection?
Distribute the load of reading from DB on multiple instances instead of one.
Supercharged video 👍
Great explanation about database connections.
Glad it was helpful!
@@themsaid it will be more helpful if you show how we use in real world with example .
Thanks, Mohammed, There is a lot about Laravel we need to learn.it's really a huge
What else do you need to Learn? Maybe I could help :)
@@themsaid how laravel boot I mean the life cycle.. From start to end.
thanks a lot you are great
Thank you for this. I really needed this.
Glad you liked it :)
Thanks to you and the team. Just please make the code font a little bit larger.
Larger than this? :D
@@themsaid Sometimes when I watch the video on mobile, the font is too small. But if it's only me, then not a big deal. Keep up the so beautiful work :)
Thanks Said! ✌🏿
My pleasure!!
Super useful!
Glad you liked it!