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

[GOT-50] Increase gateway geographical footprint #435

Open
dtbuchholz opened this issue Jan 17, 2023 · 4 comments
Open

[GOT-50] Increase gateway geographical footprint #435

dtbuchholz opened this issue Jan 17, 2023 · 4 comments
Labels
linear Sync issue with linear

Comments

@dtbuchholz
Copy link
Contributor

dtbuchholz commented Jan 17, 2023

Users in Asia, particularly in China, have noted a slow gateway response time, up to 1.2 seconds round trip time for certain queries. We're still digging into the issue and requesting additional information on the queries used. Regardless, it'd likely be beneficial to consider adding additional gateways that are closer to Asian countries as a way to reduce the read response time.

This will likely require a project that incorporates some tests to know if any other Google Cloud regions will alleviate this UX issue. It would also have a downstream impact on the SDK and CLI, which would need to allow secondary gateways to be set. Note the CLI does not offer this feature but has an open issue for custom base URLs: tablelandnetwork/js-tableland-cli#152

GOT-50

@dtbuchholz
Copy link
Contributor Author

For context, here is a query being used in the 1.2 sec scenario:

SELECT year||'.'||month as date,avg(eth) as eth_avg,avg(usd) as usd_avg,min(eth) as eth_min,min(usd) as usd_min FROM netvrk_trade_137_71 group by date order by date desc limit 1;

And a screenshot showing the avg response time at the bottom. image

@jsign
Copy link
Contributor

jsign commented Jan 18, 2023

@dtbuchholz, thanks for the details.
Testing that query directly in the gateway, it gets resolved fast.

This is just to confirm that ~1.2s duration isn't related to the query itself, but (presumably) geolocation.

@jsign
Copy link
Contributor

jsign commented Jan 18, 2023

@dtbuchholz, an offtopic comment if this wasn't apparent when seeing the result of the query.
That table has this schema:

CREATE TABLE netvrk_trade_137_71 (id INTEGER PRIMARY KEY, token_id TEXT, buyer TEXT, seller TEXT, eth REAL DEFAULT 0, usd REAL DEFAULT 0, year TEXT, month TEXT, day TEXT, time TEXT, week TEXT, quarter TEXT, tx_time TEXT, CONSTRAINT uniq_trade UNIQUE (token_id, buyer, seller, tx_time)) STRICT

That means that it has floating point values that were deprecated at the protocol level, so that exact same query in the new testnet validator won't return results since that table is invalid.

cc @carsonfarmer, @brunocalza

@dtbuchholz
Copy link
Contributor Author

Ahh, thanks for the heads up. At least we know the table owner here. Will let them know.

@brunocalza brunocalza added the linear Sync issue with linear label Mar 23, 2023
@brunocalza brunocalza changed the title Increase gateway geographical footprint [GOT-50] Increase gateway geographical footprint Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Sync issue with linear
Projects
None yet
Development

No branches or pull requests

3 participants