Re: Module connecting outside

2017-03-30 Thread Antonio Nappa
Hello, I have a module connecting to the outside through SSL with the usage of ngx_event_connect_peer and the SSL primitives of nginx. My next question is, it is better to have a separate peer and its connection for each worker, or share the same connection among all the workers? My idea is to sen

Re: Module connecting outside

2017-03-21 Thread Maxim Dounin
Hello! On Tue, Mar 21, 2017 at 02:42:01PM +0100, Antonio Nappa wrote: > By checking the ngx_http_upstream I don't see any kind of handling in case > the ngx_ssl_handshake returns NGX_ERROR, I am trying to catch this error in > order to handle network outages and subsequent reconnections attempts

Re: Module connecting outside

2017-03-21 Thread Antonio Nappa
Hello, By checking the ngx_http_upstream I don't see any kind of handling in case the ngx_ssl_handshake returns NGX_ERROR, I am trying to catch this error in order to handle network outages and subsequent reconnections attempts from my module. Do you think this could be a good way to trigger recon

Re: Module connecting outside

2017-03-09 Thread Maxim Dounin
Hello! On Wed, Mar 08, 2017 at 08:10:25PM +0100, Antonio Nappa wrote: > I am in the process of creating a module that connects to the outside to > exchange data with another service, I am taking as inspiration the > mail_module and the upstream module, basically my module is connecting > using th