Quota limitations questions

420 views
Skip to first unread message

Pavel Kolesnikov

unread,
Nov 22, 2010, 5:09:01 AM11/22/10
to google-analytics-api - GA Data Export API
Hi all,

I've been recently fixing my application that reached GA quota
limitations and I've found a couple of things that were not clear to
me:

- Does the '4 concurrent requests' limitation apply per application,
per web property or anything else?
- If we break the '10 requests in any given 1-second period' or '4
concurrent requests' limitation, how long does it take before GA stops
responding with 503 ServiceUnavailable error?
- Does quota per application refer to the application name string
only? We are running two different web application using different GA
application string. Both apps connect GA API from the same IP address.
Can we expect the "quota per application" is calculated for each
application string separately in this case?
- Are the status codes sent with 503 ServiceUnavailable response
documented anywhere? Can we be sure that 'rateLimitExceeded' refers to
the 10 requests per second limitation? How can I found out the cause
of an 503 response?

Btw is it possible that a stronger quota restrictions than documented
may take effect? For example, is it possible that GA replies with 503
response after 6 fast subsequent requests or just because of some
other undesired behavior of a client application that's not included
in the documentation?

Regards,
Pavel

Yahel Carmon

unread,
Nov 22, 2010, 10:10:49 AM11/22/10
to google-analytics...@googlegroups.com
+1 to all of these questions. 

I couldn't find much authoritative information about how the API presents these errors, either. Does anyone have API response-samples for rate limiting, etc? I'd like for my application to handle the errors, rather than just flip out.


--
You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
To post to this group, send email to google-analytics...@googlegroups.com.
To unsubscribe from this group, send email to google-analytics-data-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-analytics-data-export-api?hl=en.




--
Yahel Carmon
Associate Web Analytics Architect
ya...@bluestatedigital.com
office: 646-862-1016  /  mobile: 917.445.3498 

BlueStateDigital  /  5 West 20th Street, New York, NY 10011  /  www.bluestatedigital.com
 


Nick

unread,
Nov 24, 2010, 2:57:35 PM11/24/10
to google-analytics-api - GA Data Export API
Comments in line.

On Nov 22, 2:09 am, Pavel Kolesnikov <pavel.kolesni...@gmail.com>
wrote:
> Hi all,
>
> I've been recently fixing my application that reached GA quota
> limitations and I've found a couple of things that were not clear to
> me:
>
> - Does the '4 concurrent requests' limitation apply per application,
> per web property or anything else?

generally by IP address.

> - If we break the '10 requests in any given 1-second period' or '4
> concurrent requests' limitation, how long does it take before GA stops
> responding with 503 ServiceUnavailable error?

a little bit of time. You should really implement some rate limiting
in your client if you expect to hit this.

> - Does quota per application refer to the application name string
> only? We are running two different web application using different GA
> application string. Both apps connect GA API from the same IP address.
> Can we expect the "quota per application" is calculated for each
> application string separately in this case?

mostly IP.

> - Are the status codes sent with 503 ServiceUnavailable response
> documented anywhere? Can we be sure that 'rateLimitExceeded' refers to
> the 10 requests per second limitation? How can I found out the cause
> of an 503 response?
>

no but we should give this to you.

> Btw is it possible that a stronger quota restrictions than documented
> may take effect? For example, is it possible that GA replies with 503
> response after 6 fast subsequent requests or just because of some
> other undesired behavior of a client application that's not included
> in the documentation?

no. we actually use the quota we document.

> Regards,
> Pavel

Nick

unread,
Nov 24, 2010, 2:58:43 PM11/24/10
to google-analytics-api - GA Data Export API
Yahel / Pavel,

Do you mind opening up a feature request to doc all the errors and
responses.

I agree, It is a bit confusing.
-Nick
> > google-analytics-data-...@googlegroups.com<google-analytics-data-export-api%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-analytics-data-export-api?hl=en.
>
> --
> Yahel Carmon
>
> *Associate Web Analytics Architect*
>
> *ya...@bluestatedigital.com*
>
> office: 646-862-1016  /  mobile: 917.445.3498
>
> *
>     BlueStateDigital  /  5 West 20th Street, New York, NY 10011  /www.bluestatedigital.com
>
> *

Pavel Kolesnikov

unread,
Nov 24, 2010, 3:33:27 PM11/24/10
to google-analytics...@googlegroups.com
Nick, thanks a lot for your response! I've just submitted issue 2408 to fix the docs.

I am pretty sure my application has well implemented rate limiting (couple of unit tests as well as production logs confirm that). Now I understand my problems may be caused by another application. You wrote the the 10 qps and 4 parallel requests are restricted "generally by IP address" and "mostly IP address". Does it mean that requests performed by an application running on a different machine in the same network may be counted too?

Note I'm not trying to find a valid way how to flood GA :-) I'm pretty sure from my logs that my app doesn't do more that 10 subsequent requests that span a minute rather than a second and I'm trying to figure out if there may be any source of interference that causes the problem

thanks,
Pavel


> Regards,
> Pavel

--
You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
To post to this group, send email to google-analytics...@googlegroups.com.
To unsubscribe from this group, send email to google-analytics-data-...@googlegroups.com.

Nick

unread,
Nov 24, 2010, 3:36:48 PM11/24/10
to google-analytics-api - GA Data Export API
Thanks. It's by IP.

Two apps on the same network could have problems.

-Nick

On Nov 24, 12:33 pm, Pavel Kolesnikov <pavel.kolesni...@gmail.com>
wrote:
> Nick, thanks a lot for your response! I've just submitted issue
> 2408<http://code.google.com/p/gdata-issues/issues/detail?id=2408>to
> fix the docs.
>
> I am pretty sure my application has well implemented rate limiting (couple
> of unit tests as well as production logs confirm that). Now I understand my
> problems may be caused by another application. You wrote the the 10 qps and
> 4 parallel requests are restricted "generally by IP address" and "mostly IP
> address". Does it mean that requests performed by an application running on
> a different machine in the same network may be counted too?
>
> Note I'm not trying to find a valid way how to flood GA :-) I'm pretty sure
> from my logs that my app doesn't do more that 10 subsequent requests that
> span a minute rather than a second and I'm trying to figure out if there may
> be any source of interference that causes the problem
>
> thanks,
> Pavel
>
> > google-analytics-data-...@googlegroups.com<google-analytics-data-export-api%2Bunsu...@googlegroups.com>
> > .

Pavel Kolesnikov

unread,
Nov 24, 2010, 3:57:15 PM11/24/10
to google-analytics-api - GA Data Export API
Thanks. Last question - can you please confirm the 10,000 requests per
day is really per web property ONLY and has nothing to do with client
IP address?

Nick

unread,
Nov 24, 2010, 8:59:11 PM11/24/10
to google-analytics-api - GA Data Export API
It's per web property, regardless of application.

There is a 1:n relationship between web properties and profiles. (See
the management API for details)

So if a GA user uses 2 applications with our API for a profile
(belonging to a web property), they currently share the same 10k quota
pool.

-Nick

On Nov 24, 12:57 pm, Pavel Kolesnikov <pavel.kolesni...@gmail.com>

Martin Hapl

unread,
Nov 25, 2010, 4:34:24 AM11/25/10
to google-analytics-api - GA Data Export API
Hi Nick,

What does it mean "The same network"? If there are 2 computers with a
different public IP address, is it possible that their traffic is
counted together? If this may occur, what is the rule for treating
multiple public IP Adresses as one?

Thanks,
Martin

On Nov 24, 9:36 pm, Nick <api.ni...@google.com> wrote:

Nick

unread,
Dec 1, 2010, 9:21:11 PM12/1/10
to google-analytics-api - GA Data Export API
On Nov 25, 1:34 am, Martin Hapl <mar...@hapl.cz> wrote:
> Hi Nick,
>
> What does it mean "The same network"? If there are 2 computers with a
> different public IP address, is it possible that their traffic is
> counted together?

No. Each distinct IP address is treated separately.

prose

unread,
Dec 16, 2010, 6:32:23 PM12/16/10
to google-analytics-api - GA Data Export API
Hi all, we've just updated our codesite documents to include error
code responses/reasons for all of our feeds. Here are the links:

Export API Account Feed: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html#errorCodes
Export API Data Feed: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html#errorCodes
Management API Feed: http://code.google.com/apis/analytics/docs/mgmt/mgmtFeedReference.html#errorCodes

Hope this helps clarify. ~prose

On Nov 22, 2:09 am, Pavel Kolesnikov <pavel.kolesni...@gmail.com>
wrote:
> Hi all,
>
> I've been recently fixing my application that reached GA quota
> limitations and I've found a couple of things that were not clear to
> me:
>
> - Does the '4 concurrent requests' limitation apply per application,
> per web property or anything else?
> - If we break the '10 requests in any given 1-second period' or '4
> concurrent requests' limitation, how long does it take before GA stops
> responding with 503 ServiceUnavailableerror?
> - Does quota per application refer to the application name string
> only? We are running two different web application using different GA
> application string. Both apps connect GA API from the same IP address.
> Can we expect the "quota per application" is calculated for each
> application string separately in this case?
> - Are the statuscodessent with 503 ServiceUnavailable response

Stephane

unread,
Jan 13, 2011, 3:54:45 PM1/13/11
to google-analytics-api - GA Data Export API
Hi,

I'm a bit confused about the IP stuff...

Let's say I have a web application hosted on a server with the x.x.x.x
IP address. The web application uses the API to query any users
profile that wants to.

A user with the IP address a.b.c.d uses my web application to query
his own profile.

Now regarding the 4 concurrent limit and the 10 query per second. Who
is going to be "charge" for those queries: The web application on the
x.x.x.x IP address or the user from IP address a.b.c.d?

In other words, can 10 users from 10 different IP address use an
application to query their own profile via the API in the same time?
Or the application will be limited to process 1 user at the time?

Thanks!

Stephane


On Dec 1 2010, 9:21 pm, Nick <api.ni...@google.com> wrote:
> On Nov 25, 1:34 am, Martin Hapl <mar...@hapl.cz> wrote:
>
> > Hi Nick,
>
> > What does it mean "The same network"? If there are 2 computers with a
> > different publicIPaddress, is it possible that their traffic is
> > counted together?
>
> No. Each distinctIPaddress is treated separately.
>
> If this may occur, what is the rule for treating
>
> > multiple publicIPAdresses as one?

chris@shufflepoint

unread,
Jan 14, 2011, 10:31:08 AM1/14/11
to google-analytics-api - GA Data Export API
I assume it is whichever machine is making the HTTP calls to the GA
API - so it would be x.x.x.x, right?

- Chris
Message has been deleted

Robert

unread,
Jan 14, 2011, 10:41:22 AM1/14/11
to google-analytics...@googlegroups.com
Nick, would you mind looking at my question about max-results. It is the question before this one. I've asked about 4 questions in this group and I've had none answered. Thanks!

Stephane

unread,
Jan 14, 2011, 12:27:38 PM1/14/11
to google-analytics-api - GA Data Export API
That's what I think too but I'd like to be sure because it makes an
enormous difference on what we can do with API.

I mean, the scaling of an application is very limited with the 4
concurrent calls and maximum 10 calls per second. Not that we want to
spam the API, but let's imagine we build an application that has 1 000
000 users and 100 000 of them are checking their stats during the
lunch break... it would explode!

However, we can use javascript to interact with the API. So in this
case, I guess the IP would the user's.

Thanks

Stephane
> > > > > > > > - Doesquotaper application refer to the application name string
> > > > > > > > only? We are running two different web application using different GA
> > > > > > > > application string. Both apps connect GA API from the sameIPaddress.
> > > > > > > > Can we expect the "quotaper application" is calculated for each
> > > > > > > > application string separately in this case?
>
> > > > > > > mostlyIP.
>
> > > > > > > > - Are the status codes sent with 503 ServiceUnavailable response
> > > > > > > > documented anywhere? Can we be sure that 'rateLimitExceeded' refers to
> > > > > > > > the 10 requests per second limitation? How can I found out the cause
> > > > > > > > of an 503 response?
>
> > > > > > > no but we should give this to you.
>
> > > > > > > > Btw is it possible that a strongerquotarestrictions than documented
> > > > > > > > may take effect? For example, is it possible that GA replies with 503
> > > > > > > > response after 6 fast subsequent requests or just because of some
> > > > > > > > other undesired behavior of a client application that's not included
> > > > > > > > in the documentation?
>
> > > > > > > no. we actually use thequotawe document.

Nick

unread,
Jan 18, 2011, 8:31:25 PM1/18/11
to google-analytics-api - GA Data Export API
It depends on your application architecture.

Per your question, yes, 10 users, all using 10 different IP addresses
can query the API at the same time.

10 users using a single IP address though a proxy that you are
hosting, will have quota issues.

-Nick
Reply all
Reply to author
Forward
0 new messages