[ 
https://issues.apache.org/jira/browse/SOLR-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499439
 ] 

Yonik Seeley commented on SOLR-128:
-----------------------------------

I think the issue with persistent connections on linux is due to Nagle's 
algorithm.
The python client sends the HTTP headers and body separately, thus triggering 
it.
The following little program below writes it all at once and gets very good 
performance:

----------mysock.py-------
import socket

headers='''POST /solr/select HTTP/1.1
Host: localhost:8983
Accept-Encoding: identity
Content-Length: 11
Content-Type: application/x-www-form-urlencoded; charset=utf-8

'''

body='q=id%3A1234'
msg = headers + body

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 8983))

for i in xrange(10000):
  s.send(msg)
  rsp = s.recv(8192)  #pray we get the complete response in one go


> Include Newer version of Jetty
> ------------------------------
>
>                 Key: SOLR-128
>                 URL: https://issues.apache.org/jira/browse/SOLR-128
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>            Reporter: Ryan McKinley
>         Assigned To: Ryan McKinley
>            Priority: Minor
>         Attachments: jetty-6.3-example.zip, Jetty6.config.patch, lib.zip, 
> start.jar
>
>
> It would be good to include an up-to-date jetty version for the example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to