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
5
votes
2 answers

How does persistent tcp/ip connections preserve battery and lower bandwidth usage?

In push notification mechanisms, like Apple's Push Notification Service, they use persistent IP connections. My question is, how does employing persistent connections save battery and bandwidth of a device? I am under the impression that since the…
Dj S
  • 10,232
  • 1
  • 21
  • 24
5
votes
0 answers

How does Apache handle keep-alive connections for multiple clients on the same proxy?

I am dealing with performance issues and having trouble wrapping my head around Apache keep-alive connections. I understand that Apache is able to maintain a TCP connection for multiple requests, but I don't know how that connection is affected by a…
Chris Hanson
  • 2,043
  • 3
  • 16
  • 26
5
votes
3 answers

mysql pdo transaction and session storage

I have trouble deciding what would be the optimal solution for my web app, which is accessing (mainly reading) many times the same user data on every session. Should I retrieve all user data at once (about 40 fields) to $_SESSION when opening a new…
NotGaeL
  • 8,344
  • 5
  • 40
  • 70
5
votes
4 answers

Is it possible to stream data from client to server via http?

I'm wanting to stream data from a client (desktop or mobile) to a hosted server. It's not a large amount of data, 1 byte every 1/10 second - but the data needs to be streamed immediately (no buffering) and the connection needs to stay active for a…
PhilChuang
  • 2,556
  • 1
  • 23
  • 29
4
votes
1 answer

pg_close when using persistent postgres connections?

when using pg_pconnect connections to connect from php to postgres, does pg_close : really close the connection (ruining the persistent effect) ? hand over the connection to the pconnect pool ?
Jerome WAGNER
  • 21,986
  • 8
  • 62
  • 77
4
votes
2 answers

Node.js - Persistent connection adapter

My requirement is a little bit different, don't know even if it's achievable. I am using Node.js for developing backend application server. This server basically does two jobs: (1) Serving clients: My clients are all mobile phones who will be…
Viddesh
  • 441
  • 5
  • 18
4
votes
1 answer

Persistent connection with libcurl

The following is from the libcurl homepage: curl and libcurl have excellent support for persistent connections when transferring several files from the same server. Curl will attempt to reuse connections for all URLs specified on the same command…
jensa
  • 2,792
  • 2
  • 21
  • 36
4
votes
2 answers

How to decrease connection count to mySql DB on a remote server? My system must send data every second or two

My first post, because I haven't found answer to this problem anywhere! And i looked way beyond Google.. :) DESCRIPTION: So I have a set-up where an arduino device is connected to a laptop via USB serial cable and the laptop is connected to…
sheelis
  • 41
  • 3
4
votes
3 answers

Tornado Web & Persistent Connections

How can I write Http server in TornadoWeb that will support persistent Connections. I mean will be able to receive many requests and answer to them without closing connection. How does it actually work in async? I just want to know how to write…
Engrost
  • 799
  • 6
  • 13
4
votes
2 answers

Django persistent API connections between requests

So I have a lot of internal and external APIs that are called on basically each request. This means that there's a lot of setting up connections to these APIs. Is there a way of creating a persistent connection object that can be shared between…
olofom
  • 6,233
  • 11
  • 37
  • 50
4
votes
1 answer

Overcoming max persistent connections with different ports?

Following on from Max parallel http connections in a browser?, browsers can only have a few connections per host. I know this can be worked around using subdomains, but can I get around this by using different ports for the same host? So would the…
GIS-Jonathan
  • 4,347
  • 11
  • 31
  • 45
4
votes
0 answers

TCP_NODELAY with persistent socket?

It seems that I can either get a persistent socket connection with pfsockopen(), or get a normal socket connection with socket_connect() then using socket_set_option() to set TCP_NODELAY. But there is no way to get a persistent socket connection…
user696495
  • 139
  • 1
  • 6
4
votes
2 answers

Mysqli persistent connect doesn't work

i'm using php 5.4.4 and it seems that persistent connections with mysqli don't work. In particular, let's look at this script:
MaCi
  • 163
  • 2
  • 11
3
votes
2 answers

How to add persistent connection support to a load-balanced HTTP webservice

We are working on an HTTP webservice load-balanced using haproxy. The webservice is accessed via SSL. It is a RESTful HTTP service and simply accepts JSON, does some work, and returns JSON. There is no notion of a session. We have redundant…
jkndrkn
  • 4,012
  • 4
  • 36
  • 41
3
votes
2 answers

Implement long-polling API with Symfony

I am trying to implement an API which uses the long-polling concept in Symfony framework. Let's say that I have a table 'feeds' which can only grow (assume that users can insert thier feed from other interface). I want to create a client-side…
Guy
  • 31
  • 2
1
2
3
10 11