4 ms·
These are WebSockets, not typical HTTP requests. Connections/sec is less important because they will be long-running. The client is not continually reconnecting
by timdorr 13y ago
These are WebSockets, not typical HTTP requests. Connections/sec is less important because they will be long-running. The client is not continually reconnecting as they do with an HTTP request.
What matters most is total connection count, which appears to be very high. At 6,000 open connections on a free dyno, that is better than Pusher's $199/mo plan: http://pusher.com/pricing http://pusher.com/pricing
I think what needs to be done after this is checking how much data can be sent per second. Both in terms of raw bandwidth and messages/sec.
- GrinningFool 13y agoDoes pusher also work by holding open connections? If so, it seems that neither option is very respectful of mobile users' battery life...
- m0th87 13y agoObviously take this with a grain of salt since I didn't publish anything, but When I did some analysis on battery life impact of HTTP polling vs websockets two years ago, the difference was completely negligible compared to keeping the screen on (which I had to do for the analysis) on the iPhone 4. This makes sense in retrospect, but it appears as if websockets don't have a huge impact.
- djb_hackernews 13y agoWhat is it about an open connection that would drain the battery? It's not like it has to consume a thread in a busy wait.
- beaumartinez 13y agoCorrect me if I'm wrong, but isn't the point of web sockets a persistent connection to the server, to facilitate sending updates? You assume the battery life hit in using them. It'd be interesting to see the trade-offs between web sockets and persistent polling.
- CaveTech 13y agoI did extensive research on this about 2 years ago for Android. Holding long standing connections is much more efficient than using multiple HTTP requests, polling included. The reason being mainly the session negotiation and teardown required for making multiple requests, and the fact that the antenna required a higher energy state for creating a new connection compared to keeping an existing connection open.
- thatthatis 13y agoIs it the same result using cellular vs. using wifi?
- CaveTech 13y agoSomewhat, but multiplicative. Wifi requires a good deal more power to begin with, and the high power state of wifi is one of the biggest drains on battery life (after the screen).
- hassy 13y ago> I think what needs to be done after this is checking how much data can be sent per second. Both in terms of raw bandwidth and messages/sec. These are on the list :)
- bradgessler 13y agoIf you're looking for Pusher functionality to run on Heroku, check out http://firehose.io/ http://firehose.io/. Its open-source, so no vendor lock-in and we pump millions of messages through it in production at Poll Everywhere. I haven't deployed it to Heroku yet, but if somebody does please let me know how it goes!
- Aswedfvtd 13y agotest