Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using geocoder on production server

I am developing a location based application. And i need a trustable source for getting geolocation.

right now i am using this geocoder plugin.

and i am getting this error:-

Geocoding API not responding fast enough (see Geocoder::Configuration.timeout to set limit).

I am getting error when our team of 5 is testing on staging servers

I need a fast enough solution with some ~10k request a day with no per second limits

PS: I am open to use some paid service.

EDIT

Think of a case you want to search something in NewYork. In textbox you will type newyork and press enter. Now on server side I need to fetch geocode for newyork and then search in db based upon that.

like image 532
Mohit Jain Avatar asked Dec 21 '22 12:12

Mohit Jain


1 Answers

You should geocode client side (in javascript) you won't be hit by the limits :

Server-side geocoding, through the Geocoding Web Service has a quota of 2,500 requests per IP per day, so all requests in one day count against the quota. In addition, the Web Service is rate-limited, so that requests that come in too quickly result in blocking. Client-side geocoding through the browser is rate limited per map session, so the geocoding is distributed across all your users and scales with your userbase. Geocoding quotas and rate limits drive the strategies outlined in this article.

When to Use Client-Side Geocoding

The basic answer is "almost always". As geocoding limits are per IP address, that limit counts against the consumer of your application. It's going to be very rare that someone is going to enter more than 2,500 addresses a day sitting at their computer. Therefore, running client-side geocoding, you generally don't have to worry about your quota.

http://code.google.com/apis/maps/articles/geocodestrat.html

like image 159
Mike Avatar answered Jan 02 '23 02:01

Mike