You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Hiranya Jayathilaka <hi...@gmail.com> on 2013/08/12 21:28:23 UTC

Setting Buffer Sizes in the New API

Hi Oleg,

Up until now we supported a parameter named "http.socket.buffer-size" in the pass-thru.properties (nhttp.properties) file of Synapse. The value of this parameter was used to set the corresponding parameter on HttpParams. How should this change with the new HTTP Core API?

The reason I had to ask is that I see 3 different ways to set a buffer size in the new API:

IOReactorConfig.setSndBufSize()
IOReactorConfig.setRcvBufSize()
ConnectionConfig.setBufferSize()

For the moment I've introduced 2 new parameters to the Synapse properties files and implemented the following mapping:

http.socket.snd-buffer-size -> IOReactorConfig.setSndBufSize()
http.socket.rcv-buffer-size -> IOReactorConfig.setRcvBufSize()
http.socket.buffer-size (old parameter) -> ConnectionConfig.setBufferSize()

Does this make sense?

Thanks,
Hiranya

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: Setting Buffer Sizes in the New API

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2013-08-12 at 12:28 -0700, Hiranya Jayathilaka wrote:
> Hi Oleg,
> 
> Up until now we supported a parameter named "http.socket.buffer-size" in the pass-thru.properties (nhttp.properties) file of Synapse. The value of this parameter was used to set the corresponding parameter on HttpParams. How should this change with the new HTTP Core API?
> 
> The reason I had to ask is that I see 3 different ways to set a buffer size in the new API:
> 
> IOReactorConfig.setSndBufSize()
> IOReactorConfig.setRcvBufSize()
> ConnectionConfig.setBufferSize()
> 
> For the moment I've introduced 2 new parameters to the Synapse properties files and implemented the following mapping:
> 
> http.socket.snd-buffer-size -> IOReactorConfig.setSndBufSize()
> http.socket.rcv-buffer-size -> IOReactorConfig.setRcvBufSize()
> http.socket.buffer-size (old parameter) -> ConnectionConfig.setBufferSize()
> 
> Does this make sense?
> 

Yes, it does. You can safely ignore IOReactorConfig level parameters
though. They have been added more for completeness than anything else.
They only apply when TCP_NODEPLAY is set to false, which rarely should
be the case.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Setting Buffer Sizes in the New API

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2013-08-12 at 12:28 -0700, Hiranya Jayathilaka wrote:
> Hi Oleg,
> 
> Up until now we supported a parameter named "http.socket.buffer-size" in the pass-thru.properties (nhttp.properties) file of Synapse. The value of this parameter was used to set the corresponding parameter on HttpParams. How should this change with the new HTTP Core API?
> 
> The reason I had to ask is that I see 3 different ways to set a buffer size in the new API:
> 
> IOReactorConfig.setSndBufSize()
> IOReactorConfig.setRcvBufSize()
> ConnectionConfig.setBufferSize()
> 
> For the moment I've introduced 2 new parameters to the Synapse properties files and implemented the following mapping:
> 
> http.socket.snd-buffer-size -> IOReactorConfig.setSndBufSize()
> http.socket.rcv-buffer-size -> IOReactorConfig.setRcvBufSize()
> http.socket.buffer-size (old parameter) -> ConnectionConfig.setBufferSize()
> 
> Does this make sense?
> 

Yes, it does. You can safely ignore IOReactorConfig level parameters
though. They have been added more for completeness than anything else.
They only apply when TCP_NODEPLAY is set to false, which rarely should
be the case.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org