OCI连接池中会话复用的优势是什么

发布于 2024-10-19 05:32:09 字数 292 浏览 3 评论 0原文

我正在研究 OCI 连接池,其主要优点是会话复用。据我了解,会话多路复用是在同一物理连接上拥有多个会话。

经过一些测试后,我意识到 OCI 驱动程序仅当该连接上的第一个会话处于 IDLE 时才通过同一物理连接复用多个会话。虽然在第一个会话已经处于活动状态时不启动新会话似乎是合乎逻辑的,但我无法理解会话复用在 Web 应用程序中的实际用途。

应用程序请求连接但不使用它(即借用的连接保持空闲)的情况不是很罕见吗?

如果有人可以分享他们使用 OCI 连接池的会话复用功能的经验,那就太好了。

I am researching on OCI connection pooling whose main advantage is session multiplexing. From what I understand session multiplexing is having multiple sessions over the same physical connection.

After doing some tests I realize that the OCI driver multiplexes multiple sessions over the same physical connection only when the first session on that connection is IDLE. While it seems logical to not start a new session when the initial one is already active, I fail to understand the actual use of session multiplexing in an web application.

Won't it be very rare that the application requests for a connection and does not use it (i.e. the borrowed connection remains IDLE)?

It would be great if someone could share their experience in using the session multiplexing feature of OCI connection pooling.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若沐 2024-10-26 05:32:09

我发现以下链接非常有趣,它可能有助于阐明您的问题:

http://docs.oracle.com/cd/B19306_01/java.102/b14355/ociconpl.htm

阅读本文后,似乎连接是在“会话”中创建和维护的“OSI 模型的层。基本上,“IDLE”连接可能能够在后台运行 VoIP 等进程或从 DBMS 获取信息。希望我能提供更多帮助。请告诉我你发现了什么。谢谢&最好的祝愿!!!干杯!

I found the following link to be quite interesting and it may help shed some light on your question:

http://docs.oracle.com/cd/B19306_01/java.102/b14355/ociconpl.htm

After reading this article, it appears that the connections are created and maintained at the "session" layer of the OSI model. Basically, the "IDLE" connection might be able to run in the background for a process like VoIP or getting information from a DBMS. Wish I could be more help. Please let me know what you find out. Thanks & best wishes!!! Cheers!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文