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

Posting API very slow while ingest agent running. #85

Open
that1guy opened this issue Aug 15, 2015 · 8 comments
Open

Posting API very slow while ingest agent running. #85

that1guy opened this issue Aug 15, 2015 · 8 comments
Assignees
Labels

Comments

@that1guy
Copy link
Member

All interactions with posting api are very slooww during while ingest agent is running. This occurs in staging env and posting env.

@that1guy
Copy link
Member Author

Just adding a little more info here.

prod_posting_api_network_req_timing

Descriptions of each request from top to bottom.

1). GET all offers and questions associated with posting - https://production-posting-api.hashtagsell.com/v1/postings/0b6bb82b957a4accbf53aa343df47f53?postingId=0b6bb82b957a4accbf53aa343df47f53&questions=true&offers=true&count=100

2). GET all of a user's posts - https://production-posting-api.hashtagsell.com/v1/postings/?filters[mandatory][exact][username]=bradprodtest

  1. DELETE a specific posting ID - https://production-posting-api.hashtagsell.com/v1/postings/0b6bb82b957a4accbf53aa343df47f53

  2. GET all of a user's posts - https://production-posting-api.hashtagsell.com/v1/postings/?filters[mandatory][exact][username]=bradprodtest

@that1guy
Copy link
Member Author

that1guy commented Sep 1, 2015

Hi Josh, if you can get these requests using elasticsearch to get response times down I can handle everything else with buy/sell 360.

@brozeph
Copy link
Contributor

brozeph commented Sep 1, 2015

@that1guy - I've upgraded the MongoDB version and storage engine for the staging environment to 3.0 and wiredTiger (respectively). The wiredtiger storage engine supports a more granular level of locking at the document level (instead of collection) which should dramatically enhance read/write performance - it's quite new and wasn't readily available when we built the DBs, originally.

To do this, I had to take the staging environment down for a short period (it took approximately 1 hour). These changes are only in staging for the purposes of testing and verification... I believe this is the lowest hanging fruit for immediate performance enhancement.

Assigning to @that1guy to evaluate and see if this will work near term...

@brozeph brozeph assigned that1guy and unassigned brozeph Sep 1, 2015
@that1guy
Copy link
Member Author

that1guy commented Sep 1, 2015

Interesting. Okay, I'll read up on 3.0 and do some performance testing tonight.

@that1guy
Copy link
Member Author

Hi Josh, this doesn't seem to be resolving the issue. Believe the problem is the slower queries need to go through ES. Let discuss in meeting.

@brozeph brozeph assigned brozeph and unassigned that1guy Sep 23, 2015
brozeph added a commit that referenced this issue Sep 23, 2015
… callback instantally and continuing on with the delete in the background
brozeph added a commit that referenced this issue Sep 23, 2015
@brozeph brozeph mentioned this issue Sep 23, 2015
@brozeph
Copy link
Contributor

brozeph commented Sep 23, 2015

1). GET all offers and questions associated with posting - NOT YET ADDRESSED

2). GET all of a user's posts - USE THE FOLLOWING RESOURCE - https://staging-posting-api.hashtagsell.com/v1/users/bradprodtest/postings

  1. DELETE a specific posting ID - See updated documentation - delete returns immediately while actual removal occurs in the background for quick UI responses

@brozeph
Copy link
Contributor

brozeph commented Sep 23, 2015

Assigning to @that1guy for review

@brozeph brozeph assigned that1guy and unassigned brozeph Sep 23, 2015
@that1guy
Copy link
Member Author

@brozeph I can confirm that number 2 & 3 from above are working much quicker.

Number one, as expected, is now our bottleneck. See screenshot.
screen shot 2015-09-30 at 10 02 27 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants