简体   繁体   English

如何使用Zend Framework / PHP实现HTTPS连接池?

[英]How to implement HTTPS connection pool with the Zend Framework / PHP?

My zend application is heavily connected to another server provider of an API (XML formatted). 我的zend应用程序与API(XML格式)的另一个服务器提供程序紧密相连。 The exchange are done over HTTPS, therefore encrypted with SSL. 交换是通过HTTPS完成的,因此使用SSL加密。

Since the zend application is doing a lot (and when I say a lot, I mean it), we are asked to use a pool of https connection, in order to avoid the renegociation of the SSL encryption for each request. 由于zend应用程序做了很多事情(当我说很多时候,我是说意思),因此我们被要求使用https连接池,以避免为每个请求重新进行SSL加密。

I've seen numerous implementation in J2EE or .net but nothing in PHP or Zend. 我已经在J2EE或.net中看到了许多实现,但是在PHP或Zend中却没有看到。

So far, we've done some tests with the keep alive or persitent parameter, but without luck. 到目前为止,我们已经使用keep alive或persitent参数进行了一些测试,但是没有运气。

There is a persistence configuration flag you can set to Zend_Http_Client which should do that. 您可以将持久性配置标志设置为Zend_Http_Client来执行此操作。 What it does is add to STREAM_CLIENT_PERSISTENT to the stream_socket_client() call. 它所做的就是将STREAM_CLIENT_PERSISTENT添加到stream_socket_client()调用中。 It should, however, be noted that this is not a pool , but a persistent connection. 但是,应注意,这不是pool ,而是持久连接。 Each Apache process will have its own connection. 每个Apache进程都有自己的连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM