These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
123Next page
 

Devsite Blog: A note on CREST rate limits

First post
Author
CCP Logibro
C C P
C C P Alliance
#1 - 2015-10-13 21:16:37 UTC  |  Edited by: CCP Phantom
Just a few notes on CREST rate limits and why it matters with authed vs public CREST.

CCP Logibro // EVE Universe Community Team // Distributor of Nanites // Patron Saint of Logistics

@CCP_Logibro

Pete Butcher
The Scope
Gallente Federation
#2 - 2015-11-04 07:58:02 UTC
Is 150r/s for public CREST accurate? I'm getting a lot of "server temporary unavailable" errors with 150, but everything works fine with 100. Other than that, it's extremely slowSad

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

Pete Butcher
The Scope
Gallente Federation
#3 - 2015-11-05 19:06:44 UTC
Ok, after much testing I can confirm the 150 limit doesn't work. The servers often close the connection even with much lower limit. This is especially frustrating, since CREST speed is absurdly slow now.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

Pete Butcher
The Scope
Gallente Federation
#4 - 2015-11-09 13:11:07 UTC
It would be very nice if some dev actually responded, and even nicer if someone takes a look at the problem. Today even 100r/s limit is too much for CREST and the server closes connections all the time.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

CCP FoxFour
C C P
C C P Alliance
#5 - 2015-11-09 13:58:04 UTC
Pete Butcher wrote:
It would be very nice if some dev actually responded, and even nicer if someone takes a look at the problem. Today even 100r/s limit is too much for CREST and the server closes connections all the time.


Care to give some more details? A trace route, times of the problems, your IP or user agent so I can look into it, anything to actually help track it down?

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Pete Butcher
The Scope
Gallente Federation
#6 - 2015-11-09 14:13:08 UTC
CCP FoxFour wrote:
Pete Butcher wrote:
It would be very nice if some dev actually responded, and even nicer if someone takes a look at the problem. Today even 100r/s limit is too much for CREST and the server closes connections all the time.


Care to give some more details? A trace route, times of the problems, your IP or user agent so I can look into it, anything to actually help track it down?


Traceroute:

Tracing route to public-crest.eveonline.com [87.237.38.221]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.0.1
  2    14 ms     9 ms    11 ms  84-10-168-1.static.chello.pl [84.10.168.1]
  3    12 ms    14 ms     9 ms  89-75-13-65.infra.chello.pl [89.75.13.65]
  4    10 ms    14 ms    11 ms  pl-waw04a-rc1-ae17-2114.aorta.net [84.116.252.57
]
  5     9 ms    11 ms    14 ms  pl-waw02a-ri1-ae1-0.aorta.net [84.116.138.90]
  6     9 ms    13 ms    11 ms  pni-pl-waw05a-as1299-telia.aorta.net [213.46.178
.50]
  7    37 ms    38 ms    35 ms  hbg-bb1-link.telia.net [80.91.251.35]
  8    40 ms    38 ms    41 ms  ldn-bb3-link.telia.net [62.115.142.125]
  9    37 ms    38 ms    39 ms  ldn-b3-link.telia.net [80.91.251.165]
10  eveonline-ic-138015-ldn-b3.c.telia.net [213.248.83.198]  reports: Destinati
on net unreachable.

Trace complete.


Seems like one of the nodes is down atm, but the problem persists pretty much all the time I started testing public CREST about a week ago.

User agent: Evernus 1.36

I'm experimenting with different r/s limits and 100 seems to work most of the time. 150 in 100% cases causes closed connections by remote host. Everything in between is a lottery.

I also found it might be linked to the number of requests sent. < 1k requests seem to be handled properly most of the time, but making ~30k requests (even with <150r/s limit) causes errors.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

CCP FoxFour
C C P
C C P Alliance
#7 - 2015-11-09 14:40:27 UTC
Pete Butcher wrote:
CCP FoxFour wrote:
Pete Butcher wrote:
It would be very nice if some dev actually responded, and even nicer if someone takes a look at the problem. Today even 100r/s limit is too much for CREST and the server closes connections all the time.


Care to give some more details? A trace route, times of the problems, your IP or user agent so I can look into it, anything to actually help track it down?


Traceroute:

Tracing route to public-crest.eveonline.com [87.237.38.221]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.0.1
  2    14 ms     9 ms    11 ms  84-10-168-1.static.chello.pl [84.10.168.1]
  3    12 ms    14 ms     9 ms  89-75-13-65.infra.chello.pl [89.75.13.65]
  4    10 ms    14 ms    11 ms  pl-waw04a-rc1-ae17-2114.aorta.net [84.116.252.57
]
  5     9 ms    11 ms    14 ms  pl-waw02a-ri1-ae1-0.aorta.net [84.116.138.90]
  6     9 ms    13 ms    11 ms  pni-pl-waw05a-as1299-telia.aorta.net [213.46.178
.50]
  7    37 ms    38 ms    35 ms  hbg-bb1-link.telia.net [80.91.251.35]
  8    40 ms    38 ms    41 ms  ldn-bb3-link.telia.net [62.115.142.125]
  9    37 ms    38 ms    39 ms  ldn-b3-link.telia.net [80.91.251.165]
10  eveonline-ic-138015-ldn-b3.c.telia.net [213.248.83.198]  reports: Destinati
on net unreachable.

Trace complete.


Seems like one of the nodes is down atm, but the problem persists pretty much all the time I started testing public CREST about a week ago.

User agent: Evernus 1.36

I'm experimenting with different r/s limits and 100 seems to work most of the time. 150 in 100% cases causes closed connections by remote host. Everything in between is a lottery.

I also found it might be linked to the number of requests sent. < 1k requests seem to be handled properly most of the time, but making ~30k requests (even with <150r/s limit) causes errors.


At least looking at that traceroute you're not even making to our hardware. That last hop that was unreachable was the last node in the Telia network before our network.

Something to consider trying is making your requests through a proxy outside the Telia network.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Pete Butcher
The Scope
Gallente Federation
#8 - 2015-11-09 14:48:58 UTC
CCP FoxFour wrote:
Pete Butcher wrote:
CCP FoxFour wrote:
Pete Butcher wrote:
It would be very nice if some dev actually responded, and even nicer if someone takes a look at the problem. Today even 100r/s limit is too much for CREST and the server closes connections all the time.


Care to give some more details? A trace route, times of the problems, your IP or user agent so I can look into it, anything to actually help track it down?


Traceroute:

Tracing route to public-crest.eveonline.com [87.237.38.221]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.0.1
  2    14 ms     9 ms    11 ms  84-10-168-1.static.chello.pl [84.10.168.1]
  3    12 ms    14 ms     9 ms  89-75-13-65.infra.chello.pl [89.75.13.65]
  4    10 ms    14 ms    11 ms  pl-waw04a-rc1-ae17-2114.aorta.net [84.116.252.57
]
  5     9 ms    11 ms    14 ms  pl-waw02a-ri1-ae1-0.aorta.net [84.116.138.90]
  6     9 ms    13 ms    11 ms  pni-pl-waw05a-as1299-telia.aorta.net [213.46.178
.50]
  7    37 ms    38 ms    35 ms  hbg-bb1-link.telia.net [80.91.251.35]
  8    40 ms    38 ms    41 ms  ldn-bb3-link.telia.net [62.115.142.125]
  9    37 ms    38 ms    39 ms  ldn-b3-link.telia.net [80.91.251.165]
10  eveonline-ic-138015-ldn-b3.c.telia.net [213.248.83.198]  reports: Destinati
on net unreachable.

Trace complete.


Seems like one of the nodes is down atm, but the problem persists pretty much all the time I started testing public CREST about a week ago.

User agent: Evernus 1.36

I'm experimenting with different r/s limits and 100 seems to work most of the time. 150 in 100% cases causes closed connections by remote host. Everything in between is a lottery.

I also found it might be linked to the number of requests sent. < 1k requests seem to be handled properly most of the time, but making ~30k requests (even with <150r/s limit) causes errors.


At least looking at that traceroute you're not even making to our hardware. That last hop that was unreachable was the last node in the Telia network before our network.

Something to consider trying is making your requests through a proxy outside the Telia network.


Check out the logs for that user agent from today and last few days. The requests were getting through (looks like something died now), yet 150r/s was not attainable.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

CCP FoxFour
C C P
C C P Alliance
#9 - 2015-11-09 15:16:30 UTC
Do you by any chance mean "Evernus 1.35" ?? I don't see any "Evernus 1.36"

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Pete Butcher
The Scope
Gallente Federation
#10 - 2015-11-09 15:23:30 UTC
CCP FoxFour wrote:
Do you by any chance mean "Evernus 1.35" ?? I don't see any "Evernus 1.36"


Yup, 1.36. I just made ~150 requests right now.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

TheSmokingHertog
Julia's Interstellar Trade Emperium
#11 - 2015-11-09 16:29:54 UTC
Pete Butcher wrote:
CCP FoxFour wrote:
Stuff"


Other stuff


Sometimes a FlushDNS does wonders, also, you could route over OpenDSN as DNS pathfinder instead of your ISPs DNS servers. Works wonders for lots of services online.

"Dogma is kind of like quantum physics, observing the dogma state will change it." ~ CCP Prism X

"Schrödinger's Missile. I dig it." ~ Makari Aeron

-= "Brain in a Box on Singularity" - April 2015 =-

Pete Butcher
The Scope
Gallente Federation
#12 - 2015-11-09 16:40:39 UTC
TheSmokingHertog wrote:
Pete Butcher wrote:
CCP FoxFour wrote:
Stuff"


Other stuff


Sometimes a FlushDNS does wonders, also, you could route over OpenDSN as DNS pathfinder instead of your ISPs DNS servers. Works wonders for lots of services online.


No worries, my requests are getting through.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

CCP FoxFour
C C P
C C P Alliance
#13 - 2015-11-09 16:58:44 UTC
First, thanks for the continues pestering on this issue Pete. It has always sort of been a problem we are aware of but I will admit no action has really been taken to try and sort it out directly. We have done some other things that we thought might also help improve it but nothing has really worked.

Over the next few weeks I am going to be looking at digging into this, adding some telemetry to the CREST code, and just trying to figure out where the slowness is coming from.

I don't know when or if we will see improvements come from this, but I wanted to let you know we are looking.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Pete Butcher
The Scope
Gallente Federation
#14 - 2015-11-09 17:01:05 UTC
CCP FoxFour wrote:
First, thanks for the continues pestering on this issue Pete. It has always sort of been a problem we are aware of but I will admit no action has really been taken to try and sort it out directly. We have done some other things that we thought might also help improve it but nothing has really worked.

Over the next few weeks I am going to be looking at digging into this, adding some telemetry to the CREST code, and just trying to figure out where the slowness is coming from.

I don't know when or if we will see improvements come from this, but I wanted to let you know we are looking.


Thanks for looking at it. If you need any more info, let me know.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

Iam Widdershins
Project Nemesis
#15 - 2015-11-17 00:19:12 UTC
Hi FoxFour,

I am getting an enormous proportion (upwards of 20-30%) of responses that are failing on the public CREST wars detail route. I am probably getting a lot of closed connections, though that is being somewhat hidden by my Requests adapter, but the majority of the issues that are making past that are constructed JSON responses indicating failure: "ServiceUnavailableError", "Problem communicating with the EVE proxies". There is also a smattering of pages where headers are successfully transmitted with HTTP 200, cache-control for a valid response, and no data.

I tried reducing my in-flight limit from 150 to 50, and my rate limiting from 140 per second (3ms spacing) to 100 per second (6ms spacing); none of this appeared to help. I have even seen these JSON ServiceUnavailableError messages in Chrome once or twice when trying to figure out what was going on. If I need to restrict my in-flight to less than 100 or so there is no way I can even come close to achieving the ratelimit, as I am already well under it even with 150.

Immediately re-requesting the page will often, but not always, actually help. Continuing to re request over various timelines will eventually get you the data you're asking for, because it's definitely there... but it's a gamble.

As for traceroutes, my tracert fails at 213-152.240-254.PXu259.above.net, reporting destination unreachable, and I cannot ping; the VM I maintain a couple thousand miles from here cannot ping either, nor does the route resolve past 9 hops.

Any info on what I should be doing differently, or should I just hold tight and make do for now while the service is shored up?

Lobbying for your right to delete your signature

Dulcet
Sibelco
#16 - 2015-11-18 05:04:30 UTC
Hi FoxFour,

I WAS having the same issues as both Iam and Pete and I have to wonder if it was my testing against public-crest that contributed to the constant problems.

My experimentation is very similar to that of Pete’s in that very fast polling (rate limits of 150 per second) was causing random closes in connections by the remote host. And similarly to Pete I found it linked with the number of requests sent. In my case it seemed to always crap out at around 1.5k requests. Additionally, waiting a minute or two and starting the polling again would almost always obtain the same results.

Using netstat revealed that almost all of my sockets were staying open with TIME_WAIT and that I was creating an insane amount of new sockets. I have to wonder if it is the amount of open sockets and concurrent connections that was causing the crest server to bork?

At first I thought that you all had some code to disconnect clients that were making an excessive amount of concurrent connections (which would explain my disconnects after n amount of requests). However, if others are having disconnects (which seem to correspond to my testing) I have to assume that these events are related.

Is it possible that whatever server you are using was using up all of its socket pool and not able to send out any more connections? I only suggest this because after my TIME_WAIT eventually was removed by the timeout, another connection was eventually established.

The problem that I had with excessive amount of concurrent connections and TIME_WAIT has been fixed in my code. I found that the problem was in how my software, nodejs in this case, was not properly using http keep-alive. If anyone out there is using Nodejs to make requests using https.request() and doing a lot of fast concurrent requests against crest I highly suggest using agentkeepalive , otherwise you will have the same issue.

Anyway, this keep-alive fix works for me now and allows me to regularly obtain rate limits of 150ms with way more than 1.5k requests Big smile

If Pete and Iam stop having problems, I think it might be safe to assume that the amount of socket connections might be an issue.
Iam Widdershins
Project Nemesis
#17 - 2015-11-18 06:50:46 UTC  |  Edited by: Iam Widdershins
I don't know about that, but I've been using python requests 2.8.1, the most recent version. It does request keep-alive in the HTTP headers, though I have not delved down into anything as low-level as checking the socket longevity (edit: I did, below; it is reusing connections correctly); the module's documentation indicates that it should be automatically re-using connections from an internal pool, maintained with keep-alive.

I am seeing, though, that for certain numbers of concurrent connections the situation is pretty dire. There is no real documentation on this and nobody has nobody has given any restrictions on the numbers allowed; requests such as those on the war detail route that are likely to miss the x-cache do not process fast enough to remotely approach the ratelimit on less than 70 or so concurrent connections, but the connections are closed by the server and must be reestablished (along with the reported failures) with incredible speed, with as few as thirty concurrent connections to the server, and the failure rate starts to creep up the more you add.

I'd go ahead and just limit it to 20 in-flight requests or so (which seems to be largely error-free), but the overall rate of successful responses is much, much higher when making 150 concurrent requests. I'd feel a little bad for hammering the server, but I'm doing my utmost to respect all posted limits, and this gets me my data a couple hours sooner (this is just the first half-million requests I'm working on right now, the total pool will be over double that, in similar conditions Sad).

Lobbying for your right to delete your signature

Pete Butcher
The Scope
Gallente Federation
#18 - 2015-11-18 07:42:38 UTC
In my case, I can say I make max 6 sockets for parallel connections. Used to be much more before the limit - ironically it worked then more often than now.

http://evernus.com - the ultimate multiplatform EVE trade tool + nullsec Alliance Market tool

Iam Widdershins
Project Nemesis
#19 - 2015-11-18 22:54:23 UTC  |  Edited by: Iam Widdershins
Pete Butcher wrote:
In my case, I can say I make max 6 sockets for parallel connections. Used to be much more before the limit - ironically it worked then more often than now.

If I were to do that I would actually never finish. Average elapsed time per request is generally between 700 and 1600 milliseconds for my physical location and the data I am after. I'm not after cached data and I don't live in Europe :(

Lobbying for your right to delete your signature

Dulcet
Sibelco
#20 - 2015-11-19 00:52:46 UTC
Iam,

Today I was able to pull in ALL of the market data for all applicable market type, buy/sell, in all regions, in just about 4 hours. I have to imagine this is probably fast enough for most applications. This is using rate limits of 100 req/sec.

Unfortunately, I am still receiving a lot of errors (dropped connections, socket hang ups, and the random missing data). Over the course of the 2 million requests I had about 150k errors of which I simply did a re request. I should note that if I go above 100 req/sec I see ALOT more disconnects, so I'm staying away from the suggested max of 150 req/sec.

Not having these errors would probably save about 15 minutes or so in the grand scheme of things and if they can fix up to 150 req/sec it would probably save an hour+ of time.

Most of the regions however have 0 market data, but unfortunately there is no way to tell, which could save us a lot of additional time.

@FoxFour - It would be nice if there was some way to quickly tell if a region has no orders, so we do not have to traverse the region. Like maybe add that as a property to the /regions/ emdpoint. Better yet, maybe give us a way to grab all the market data from the region in one area instead of having to traverse all the types. I'm sure that would be better than the 2 million+ req per app per day scenario for those of us that want to analyze all the market data.

123Next page