I am trying to load test one aspect of our application. It involves a lambda that grabs data from Cloudant and processes it. Due to constraints on AWS' API Gateway, we receive a timeout from the gateway if the lambda takes more than 30 seconds to return a result. This means we need to run our loadtest in the lambda loading from Cloudant to get accurate results of the real world.
First thing I did was insert 51,001 documents into Cloudant using bulk docs. After inserting them, I hit the all_docs endpoint and it confirmed that there were 51,001 documents in the database.
The problem arises when I hit the view that helps us query the documents. After 1 hour it was returning 13000k documents. Every time I hit it I would get 100-200 more documents in the view. Fast forward to now, 13 hours after inserting the transactions into the database, the view is just now returning 51,001 documents.
Does Cloudant always take this long to create views when a large number of transactions are inserted? Up until 10k-11k its chugging along just fine, but then it takes 12 additional hours to generate the rest. Surely this isn't the intended behavior? I can't share code because it's my company's, but the view that we are emitting per doc is very small. Its a JSONobject with approximately 8 params, its really small.
24 hours later the behavior ceased, and I could insert 50k trans and the view updated in real time. I guess cloudant was rate limiting us or there was some weird resource limit.
Can't find any documentation of this which is unnerving