Closed pete-wn closed 8 years ago
The first stage of this is planned for release tonight/tomorrow, prior to the Perandus Flashback events.
It consists of a single decided node with two enterprise grade SSD's running only one ElasticSearch index. I did a significant amount of testing with multiple nodes running via docker and did not see a performance gain that justified it. The downside is that with only one node, a crash can cause serious problems, but this isn't an enterprise grade system and I've only had elasticsearch crash once in the past two years.
The upside is that the query performance in testing is significantly faster.
Deployment plan is as follows:
No other changes should be necessary for the first stage.
The index seems to be lagging behind significantly. I've been constantly seeing items that are sold already:
This gloves is still present at the time of this writting:
{
"_index": "poe20160505",
"_type": "item",
"_id": "58ff1ebd84c8b1d69f02eb29b19d50b08c64046fac4fd383df06437a6d759e06",
"_score": null,
"_source": {
"shop": {
"stash": {
"xLocation": "3",
"inventoryID": "Stash3",
"yLocation": "9",
"stashName": "~price 1 chaos",
"stashID": "88b5b2566412ad22ed9d457dfa420f6e5aae694d9a615b1184ea550f6e79cc68"
},
Search:
{
"index": "index",
"sort": [
"shop.chaosEquiv:asc"
],
"from": 0,
"size": 20,
"body": {
"query": {
"filtered": {
"filter": {
"bool": {
"must": {
"query_string": {
"default_operator": "AND",
"query": "( attributes.itemType:Gloves modsPseudo.+#%\\ Total\\ to\\ Fire\\ Resistance:[26 TO *] modsPseudo.+#%\\ Total\\ to\\ Cold\\ Resistance:[19 TO *] modsPseudo.+#\\ Total\\ to\\ maximum\\ Life:[70 TO *] requirements.Level:<=54 (shop.hasPrice:false OR shop.hasPrice:true) ) attributes.league:\"Perandus Flashback HC\" shop.verified:YES"
}
}
}
}
}
}
}
}
On my end, the server is processing the API faster than it comes down (i.e. the processing threads are often waiting up to a few seconds for new updates to come in). Items are showing up within ~10s of hitting the API update stream, which is the refresh value of the index.
Overall the API stream is pretty relaxed at the moment, with ~10-30 stashes coming through every 3s.
If items aren't getting all updated properly, I can only assume something is going on with the API itself. This jives with the fact that poe.trade seemed VERY slow to update yesterday as well. Right now the API looks totally fine, but it may have been glitching out at some point over the weekend.
I'm going to close this out for now and review in the future.
This issue will serve as a placeholder for the plans to implement the new Infrastructure required for production deployment of both the ExileTools v4 Indexer as well as the associated production infrastructure.
This will give interested parties additional insight into the current production environment as well as illustrating how the organic growth of ExileTools and the adoption of various tools over time has led to a inefficient infrastructure.
Current Infrastructure Overview
Hardware / Software
pwx
Back End Services include:
Front End Services include:
pwx2
Back End Services include:
Front End Services include:
pwx3
Back End Services include:
haproxy
ElasticSearch
The Future / Planned Changes
These changes will be deployed into production at some point after or while deploying the v4 Indexer Pipeline. I may wait to make full infrastructure stack changes until the Perandus leagues are over. I will announce my plans on twitter when they are nailed down.
Other Big Changes
I think that when I move to Tyk 2.0 I will drop the requirement for API keys and authorization headers and just fully open the index - instead, I will just apply rate limiting by end user IP address. The main reason I originally asked for people to sign up for API keys was so that I had a list of the userbase, but at this point there are something like 500+ API keys out there and less than 20 are in active daily use, so it's not very useful or accurate.
I'm also considering picking up some "new" hardware off ebay instead of just deploying on one primary box. Let's see where this goes first though.