Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polling improvements: switch to faster host, accept error responses #37

Open
chrisbolin opened this issue Mar 31, 2019 · 3 comments
Open
Labels
enhancement v3 possible v3.0.0 features

Comments

@chrisbolin
Copy link
Collaborator

chrisbolin commented Mar 31, 2019

Faster host

We use ipv4.icanhazip.com currently because that's the standard for other JS polling libraries. But we can probably get much faster. Here are some quick tests:

--- ipv4.icanhazip.com ping statistics ---
round-trip min/avg/max/stddev = 154.028/159.056/188.548/11.154 ms
159 ms average

--- google.com ping statistics ---
round-trip min/avg/max/stddev = 23.071/24.103/26.079/0.830 ms
24 ms average

--- twitter.com ping statistics ---
round-trip min/avg/max/stddev = 51.824/52.745/53.685/0.731 ms
52 ms average

--- akamai.com ping statistics ---
round-trip min/avg/max/stddev = 39.591/40.428/41.625/0.620 ms
40 ms average

Can anyone think of a host to try that might beat google?

Accept error responses

#20 introduced a subtle change that we should look into more: looking at response status. We should accept (i.e. count as "online") any response, as long as it comes from the server. a 404 and a 500 both mean that we contacted the server, and are just as good as a 200.

@Francomgarcia
Copy link

Hey, it seems the library has an issue in windows. It shows this url http://ipv4.icanhazip.com/ can't be accessed.

@chrisbolin
Copy link
Collaborator Author

@Francomgarcia see #41

@chrisbolin chrisbolin added the v3 possible v3.0.0 features label Jun 6, 2019
@chrisbolin
Copy link
Collaborator Author

chrisbolin commented Jun 21, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v3 possible v3.0.0 features
Projects
None yet
Development

No branches or pull requests

2 participants