libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Regarding Flow control


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Regarding Flow control
Date: Tue, 18 Sep 2018 11:48:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi!

Good news: You don't need to do anything.  MHD will maintain persistent
TCP connections and use TCP's flow control mechanisms automatically.
You can _force_ MHD to not keep connections open by adding "Connection:
Close" to your HTTP response header manually, but by default MHD will do
the right thing.

This is independent of your threading model or the use of suspend/resume.

Happy hacking!

Christian

On 09/17/2018 05:33 PM, Santos Das wrote:
> Hi,
> 
> Just to add more, my application is single threaded and I am running MHD
> inside that. I don't create additional threads. I use suspend and resume
> as suggested earlier as I do async processing.
> 
> So, I am thinking how can we implement flow control in this scenario..
> 
> Thanks, Santos
> 
> 
> 
> On Mon, Sep 17, 2018 at 8:22 PM Santos Das <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     Hi,
> 
>     Could you kindly let me know how can we implement the flow control ?
>     Protection against the badly behaving clients.
> 
> 
>     HTTP/1.1 servers SHOULD maintain persistent connections and use TCP's 
> flow control 
> 
>     mechanisms to resolve temporary overloads, rather than terminating 
> connections with 
> 
>     the expectation that clients will retry. The latter technique can 
> exacerbate network 
> 
>     congestion. 
> 
>      
> 
>     https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
> 
> 
>     Thanks, Santos
> 
> 

Attachment: 0x939E6BE1E29FC3CC.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]