Database Connection Pooling: Why It Matters? Essential OS-Level Insights

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 14

  • @necrotikS
    @necrotikS 7 หลายเดือนก่อน

    This was awesome. I miss videos like this, where they show you in practice what is happening. Thank you for it.

    • @DevMastersDb
      @DevMastersDb  7 หลายเดือนก่อน +1

      Thanks for the valuable feedback. As an engineer, I see what you're saying. I need to get back on track with my "Database Internals" series. Already have a few ideas in the backlog. Stay tuned, my friend!
      Btw, is there anything specific you'd like to learn more about from the database world (by looking into how things work internally)?

    • @necrotikS
      @necrotikS 7 หลายเดือนก่อน +1

      @@DevMastersDb well... One thing that I find interesting is commits, rollbacks and eventual consistency. Indexes as well, how they work behind the scenes. I know some theory, but actually seeing it would be cool.
      Also, it would be interesting to improve performance of a slow system, something like that.

    • @DevMastersDb
      @DevMastersDb  7 หลายเดือนก่อน

      @@necrotikS noted!

  • @joobis.b4568
    @joobis.b4568 8 หลายเดือนก่อน +1

    great content !

    • @DevMastersDb
      @DevMastersDb  8 หลายเดือนก่อน

      Thanks, glad you liked it!

  • @mhmdhosny25
    @mhmdhosny25 10 วันที่ผ่านมา

    Thanks a lot

    • @DevMastersDb
      @DevMastersDb  10 วันที่ผ่านมา

      you're welcome, I'm glad you like the video!

  • @grafikdesigner4399
    @grafikdesigner4399 9 หลายเดือนก่อน

    thanks a lot for this video !

    • @DevMastersDb
      @DevMastersDb  9 หลายเดือนก่อน

      Glad you liked it!

  • @Greez0422
    @Greez0422 9 หลายเดือนก่อน

    Thanks for the video. It was very helpful information. But what is the proper pool size when you set up the connection pool ?

    • @DevMastersDb
      @DevMastersDb  9 หลายเดือนก่อน

      Glad you found it helpful! Thanks for dropping the note.
      Well, there is no magic number for the connection pool size. Usually, connection pools cache 5-10 connections by default (that's exactly what I used in my app). Some folks pick a number between 10-30.
      But, a good engineering approach would be to measure various metrics (throughput, number of concurrent connections, number of CPUs) and set a pool size accordingly. Take a look at this discussion: stackoverflow.com/questions/8753442/thinking-behind-decision-of-database-connection-pool-size

  • @zoki5388
    @zoki5388 8 หลายเดือนก่อน

    have a question about Docker. I'm trying to run Docker Compose for two services: a PostgreSQL database and a Next.js application. The database is initialized with several million rows, so many insert operations are executed when it's run. The Next.js application needs access to the database at build time. How can I ensure that one service waits for the database to be ready? I've tried writing health checks, but they didn't work out.
    Do you have any tips or perhaps a video that could help?
    I would greatly appreciate it.

    • @DevMastersDb
      @DevMastersDb  8 หลายเดือนก่อน

      Hey, I usually use the wait-for-it script. It might not be the best solution but it works like a charm for me: github.com/vishnubob/wait-for-it
      Check this article that shows how to use the script from Docker: laurent-bel.medium.com/waiting-for-postgresql-to-start-in-docker-compose-c72271b3c74a
      Let me know if it works for you. I'll consider recording a video.