Questions tagged [persistent-connection]

HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. The newer HTTP/2 protocol uses the same idea and takes it further to allow multiple concurrent requests/responses to be multiplexed over a single connection.

153 questions
2
votes
1 answer

Why doesn't Flask establish persistent HTTP connection with multiple requests from Java application using HttpURLConnection?

I have a minor project which will involve repeated HTTPS communication between a Java application and a Flask web server such that keeping the TCP connection alive is important. In order to test and understand the capabilities of these technologies,…
2
votes
1 answer

How does HTTP/1.1 solve the TCP reset problem?

I am trying to understand the TCP reset problem mentioned in RFC 7230: HTTP/1.1 Message Syntax and Routing, § 6.6: 6.6. Tear-down The Connection header field (Section 6.1) provides a "close" connection option that a sender SHOULD send when it…
Géry Ogam
  • 6,336
  • 4
  • 38
  • 67
2
votes
0 answers

What is maximum limit of host for single NSURLSession

We can add maximum concurrent connection per host in iOS using NSURLSession, Reference How many different hosts can be added in NSURLSession concurrently to establish persistent connection.
Mahendra Y
  • 1,941
  • 20
  • 26
2
votes
1 answer

Why is the data connection non-persistent in FTP? What advantage does this offer over keeping it as a persistent connection?

The control connection in FTP is persistent but the data connection is created and disposed after each data transfer (aka. non-persistent). What are the advantages to making the data connection non-persistent? Does making the data connection…
2
votes
2 answers

Persistent TCP connections, long timeouts, and IP hopping mobile devices

We have an app with a long polling scheme over HTTP (although this question could apply to any TCP-based protocol). Our timeout is fairly high, 30 minutes or so. What we see sometimes is mobile devices hop from IP to IP fairly often, every minute or…
sehugg
  • 3,615
  • 5
  • 43
  • 60
2
votes
2 answers

How to send request periodically to the client from the server by http persistent connection

I am new in http connections. The thing I want to realize is that the server should send some data (notifications) to the client periodically by persistent connection. I wrote a code in server side by php…
Vanguard
  • 1,336
  • 1
  • 15
  • 30
2
votes
2 answers

Persistent connections that dont persist between two php scripts

I created a temporary table in one php file, and want to access it in another php file. the scripts run sequentially. I used mysqli and am prepending p: to hostname. The problem is in my second php file, I cant access my temporary table. So I…
No name
  • 81
  • 1
  • 13
2
votes
0 answers

Can XHR reuse persistent connections opened during page load?

When loading a page a browser will open several persistent TCP connections to the server. When executing javascript later and making XHR requests does the browser reuse these connections or does every XHR request always imply a new TCP connection…
Jubke
  • 41
  • 4
2
votes
1 answer

Can someone explain how MongoDB's persistent connections work?

I'm only used to writing small scale web applications, and [at work] we're building something for our customers that we anticipate will be pretty data-intensive. We've chosen MongoDB because the of the loose schema system we need but I'm a little…
Adam
  • 311
  • 1
  • 3
  • 15
2
votes
1 answer

Async NSURLConnection and keep-alive

I'm using NSURLConnection to perform a series of HTTP requests to the same host asynchronously, i. e. with [initWithRequest:delegate:startImmediately:] and a delegate. When connectionDidFinishLoading notification comes to the delegate, I release my…
2
votes
1 answer

PHPUnit reuse PDO connection

I've been digging around for a few hours now but I can't find a way to recycle a single PDO connection (MySQL) over multiple unit tests. Is there such an animal? It seems like I should declare it somehow in the bootstrap, but PDO connections can't…
Ben
  • 54,723
  • 49
  • 178
  • 224
2
votes
2 answers

Why is content-length required in case of HTTP persistent connections

My understanding of how data transfer happens in tcp/http is this: The application layer on the server side passes some data to the tcp layer to be sent to the client. The tcp layer breaks the application data into segments and sends it further. The…
Vivek
  • 2,000
  • 3
  • 16
  • 22
2
votes
1 answer

How to throttle SignalR clients on the server side

I am using a PersistentConnection for publishing large amounts of data (many small packages) to the connected clients. It is basically a one way direction of data (since each client will call endpoints on other servers to set up various…
cwt237
  • 267
  • 3
  • 9
2
votes
0 answers

SignalR Persistent Connection in a coded Webtest

I have the following code in a console app: var connection = new Connection("http://localhost/xxx/signalr"); connection.Error += ex => { string msg = string.Format("***SignalR Error: {0}", ex.ToString()); …
pexxxy
  • 489
  • 1
  • 6
  • 17
2
votes
1 answer

Persistent socket/connection PHP for SMPP/SMS

I need to set up a persistent socket connection in PHP and not sure how to achieve this. Currently when I send an SMS message I a) open a socket connection b) send a message (via SMS/SMPP) and c) close the socket connection however I need to not…
user1746582
  • 579
  • 1
  • 9
  • 20