Comments (8)
Hi,
sorry it took me a bit of time to get back to you.
I just ran the same benchmark from the UK and it's taking 9.9 seconds to send 100 requests. So ~10 requests per second or 100ms per request.
One reason I can think of why you are getting higher latencies would be if HTTP Keep-Alive is not used, most likely if an old version of PHP or curl is being used. In that case the TCP and SSL negotiation would have to be re-done on each request which would prove expensive (4 round trips at 60ms = 240ms).
Another reason would be the latency between hostgator and the Amazon us-east-1 datacenter. I don't know anything about hostgator's network quality and peering agreement so do let me know if you find out more about it. All I know is that traffic between the west and east of US generally adds 60ms of latency. You can find more about it over here: http://console.datapath.io/map for global latencies map. So if latency is important to you I would recommend to find a host that is closer to where pusher is being deployed. One good way to find out about latency would be to run ping api.pusherapp.com
from your hosting provider.
If you need even more throughput we also have a batching end-point that can send multiple events in one HTTP call. This removes some of the header overhead from HTTP requests. We haven't documented this yet but if you're interested do let me know.
Hope that helps. Please get back to me if you have further questions.
from pusher-http-php.
I agree, 500ms is bad but our API internal latency is around 30ms. How do you measure the latency and where are your servers located ?
from pusher-http-php.
php server is located us west at hostgator.com
this clearly takes 60 seconds to complete on the Pusher side. not sure why when the trigger was pushed as fast as it could handle
php code :
for ($x = 0; $x <= 120; $x++) {
$data['message'] = '00:00:00.' . str_pad($x , 4, "0", STR_PAD_LEFT);
$pusher->trigger('test_channel', 'my_event', $data);
}
from pusher-http-php.
I was actually using AP1 Asia Pacific 1. which is closer to where I am in New Zealand. because I thought it would mean the browser talks directly to the AP1 server. Its using the latest hostgator server, less than a month old, so I am sure the http keep alive is active?
from pusher-http-php.
Alright. If you use the same map (http://console.datapath.io/map and select AWS and Singaport (ap-southeast-1) you'll see that the latency is ~200ms to us west. Feel free to contact us on [email protected] if you want to share more private information. You can find your own latency by running ping api-ap1.pusher.com
and mtr --report api-ap1.pusher.com
from pusher-http-php.
Closed as not our latency that is at issue.
from pusher-http-php.
Same issue. But I think the real issue is SharedArrayBuffers (SABs) can be used to construct high-resolution timers. High-resolution timers simplify Spectre attacks on cross-origin resources. That's why browsers are slowing down pusher
from pusher-http-php.
Pusher speed is super slow! How can i fix it ?!
from pusher-http-php.
Related Issues (20)
- Echo.listen not working in pusher-php-server 7.2.1 HOT 2
- Upgrading from 7.0.2 to 7.2.0 breaks broadcasting events in laravel HOT 5
- Pusher error: cURL error 28: Failed to connect to api-eu.pusher.com port 443: Connection timed out HOT 7
- Invalid user id from pusher server. HOT 2
- The CI setup is not friendly to community contributors HOT 1
- Add the ability to set Guzzle config from $options HOT 3
- v7.2.1 is not compatible with pusher SDK HOT 5
- Batch message sending does not add socket_id from event HOT 6
- Internal Server Error 500 HOT 2
- Pusher Beams Enquiry HOT 23
- Reporting a vulnerability HOT 1
- Pusher being run at Laravel package:discover resulting in Argument Error HOT 7
- Pusher Presence Channel Data HOT 1
- First parameter must either be an object or the name of an existing class {"exception":"[object] (ErrorException(code: 0) HOT 2
- Question about deprecation for all of the versions above v13 HOT 1
- [bug] cannot set a custom timeout as a option in pusher
- Triggering single event on multiple encrypted channel fails HOT 1
- Pusher websocket URL triggering events and sending data HOT 1
- You MUST recompile PHP with a larger value of FD_SETSIZE. It is set to 1024
- How to Properly Handle json_decode Error with Guzzle Stream in Pusher Library?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pusher-http-php.