Revproxy is working quite well for a variety of requests now.
One more issue we are encountering while spooling responses back to the
client, is a fairly sizeable delay before the connection is being closed.
This happens when the proxy is proxying to another port on localhost (which
is how we run our development environments). I couldn't reproduce when
upstream was a different server.
For example, requesting a single file, the revproxy code very quickly
receives the reply from upstream, then the spool callback proceeds to
return the result to client in 4096 chunks.
These happen rapidly until the final chunk. In that case, we get a ~5
second delay, then finally the last spool callback is triggered, the final
chunk of data is sent, then the connection is auto closed by the spool proc.
In the following log extract the delay can be seen between 18:25:52 &
18:25:57
Revproxy output
<https://gist.github.com/davidqc/a665905f4e44ab35c4e5356d7067ce90>
This was a quick test case based on the latest code:
Naviserver Config
<https://gist.github.com/davidqc/980ace1188f0537f3d616b847ccc2f3b>
Naviserver Init
<https://gist.github.com/davidqc/0f0d5210fa16012f35afec4fde5f86c9>
Add a static file to pages/, then https://www.test.co.uk/proxy/file.html
The content is displayed but the connection does not close for > 5 seconds.
Any ideas why this might be happening?
I'll continue to try to narrow it down...
Regards,
David
> On 24 February 2017 at 19:32, Gustaf Neumann <neum...@wu.ac.at> wrote:
>
>> Am 24.02.17 um 18:21 schrieb David Osborne:
>>
>> Thanks, that's working great for me.
>> Have tested it with large POST data, binary data, UTF-8 data and all gets
>> handled perfectly.
>>
>> Only issue I've come across is testing the behaviour when the proxy can't
>> connect to the backend. I'm getting a segfault for every request in that
>> case.
>>
>> tested proxy https connection to non-existing host ... fine.
>> tested proxy https connection to the non-listening port ... fine
>> tested proxy https connection to a non-https port ... bingo
>>
>> Fixed in https://bitbucket.org/naviserver/naviserver/commits/9264a64b
>> f2d81e6c142a2bab2b5f0deb3acd7c14
>>
>> all the best
>> -gn
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> naviserver-devel mailing list
>> naviserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/naviserver-devel
>>
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel