-
-
Notifications
You must be signed in to change notification settings - Fork 40
Fastah API datasource: initial implementation #152
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
Conversation
|
Exciting! I will add a few comments to you code ... |
| } | ||
| } | ||
| } catch (\Exception $e) { | ||
| return _geoip_detect2_get_new_empty_record($ip, $e->getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please check for the "HTTP/2 not supported" Error and make a more user-friendly error string out of it? "Please disable HTTP/2-support ..."
Because I think this error might still happen, e.g. when a server configuration is changed or when the site is migrated over to another server. As far as I see it, HTTP/2 is only checked when the user changes the option. Also, the detection might be incomplete and HTTP/2 doesn't work even though curl says it should work.
|
Oh sorry I sent you the review comments just now because I forgot to click on "submit review" ... |
|
I will merge it into a feature branch and do the small changes above myself, you can continue to improve it there if you want. I would release it for 5.1.0 in some week's time. |
|
Apologies, I was going to finish the requested edits this week in the new year :) . Happy to work in the feature branch too . Will support too. |
|
The lookup is working now, but I am getting response times of 700-800ms with HTTP/2 enabled. Do you think it is because it is currently using the Wordpress implementation |
|
BTW, the plugin already does client caching of the response, both in-memory and in-database (across lookups). |
|
https://console.api.getfastah.com is also quite slow for me, with response times of 1-5 seconds for a page load. Other sites are fast, maybe your AWS datacenter is too far away from Germany? |
In the interest of speed of getting version 1 available to plugin users, let's remove the HTTP/2 support entirely and use the caching that you refer to as the latency-minimizer. PS: As seen on these 2 pages, the HTTP/2 multiplexing feature needs some testing to figure out, including async use of the multi object: PPS: Yes, the API edge is in Singapore (only) at the moment, so some latency from Germany is to be expected for the initial TCP setup. Subsequent latency depends on data caching, connection re-use, and correct enabling of HTTP/2 multiplexing. |
* Fastah API datasource: initial implementation (#152) * Initial Fastah API implementation * Fastah API : typo fixes * Fastah : Better copyediting * Fastah : Better HTTP/2 capability detection and messages * Fastah : Fix fallback HTTP proto version * Fastah: API response parsing and data fill * Fastah: remove wayward echo * Fastah: fix test result expectation ordering * add isset conditions to avoid PHP notices * parameter english * removing option fastah condition * HTTP/2 support notices * fix params * Allow HTTP/2 support again * try out stream_context * error handling * Add User Agent * mc Co-authored-by: Siddharth Mathur <siddharth@getfastah.com> Co-authored-by: Benjamin Pick <benjaminpick@github.com>
As discussed in issue #81 . Review welcome, and appreciated.
Also, it's a bit daunting to create the test setup on my local sandbox, so I will need to see the Travis bot output.