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

wttr.in out of datasource capacity #53

Closed
skip- opened this issue Oct 6, 2016 · 7 comments
Closed

wttr.in out of datasource capacity #53

skip- opened this issue Oct 6, 2016 · 7 comments

Comments

@skip-
Copy link

skip- commented Oct 6, 2016

Love the service and the text weather!
Just found this project after installing LXLE.

I'm not sure what the datasource capacity is. Based on the error message on your webpage, it sounds like it could be 1M queries per day.

Doing some quick math, you can serve up

  • 11 different locations once per second for 24 hours
  • 57 different locations once per 5 seconds for 24 hours

I'd be curious to see the traffic log and see how many different locations are being served and at what rate. If a lot of traffic comes from a few locations, caching either using srv.py or at the client could help. Weather doesn't change by the second usually, so it might be useful to cache weather for between 5 seconds and 5 minutes to reduce the number of queries sent to your datasource.

I may try to implement something like that given some time free after my day job :)

@skip-
Copy link
Author

skip- commented Oct 6, 2016

Please excuse the above if you did implement caching. I didn't see it when I read through srv.py but perhaps it is implemented in wego or some other dependency.

I did go to worldweatheronline.com and found in their FAQ the following entry requesting that free API users cache requests in 15 minute intervals (even longer than I was thinking):

Is there a limit on the number of weather data requests per day for Free API users?

Our free weather API users have a limit of 250 requests per day.

We also request the proper caching of data before new requests for same location are made within 15 minutes.

@chubin
Copy link
Owner

chubin commented Sep 3, 2017

see also: #9

@alexellis
Copy link

Is there a rate limit on the public service?

@chubin
Copy link
Owner

chubin commented Mar 31, 2019

@alexellis Yes, but it can be hardly reached. Why? Are you experiencing some problems currently?

@alexellis
Copy link

Curious how much it can be used by an individual user. 100 times? 1k times? 100k times?

I might accept it into the OpenFaaS Function Store

@chubin
Copy link
Owner

chubin commented Mar 31, 2019

@alexellis currently we have the following limits (per IP):

# (minute, hour, day) limitations:
QUERY_LIMITS = (300, 3600, 24*3600)

but they will be increased soon

I've just gone through the issue you've mentioned, I would like to make a couple of remarks:

  1. wttr.in supports configurable queries (/:help for that), you should consider making them configurable; via some additional function parameters etc;
  2. wttr.in is translated into 60 languages, is should be configurable too;
  3. wttr.in supports single line mode with many addtional data that can't be seen in the main mode (see: curl wttr.in/?format=3 for example)
  4. Several new cool features (output formats) will be added soon

@chubin
Copy link
Owner

chubin commented May 23, 2020

The query limits are removed now.

@chubin chubin closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants