incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <>
Subject Re: Question on Load Balanced Configuration
Date Mon, 23 May 2011 22:22:53 GMT
On Tue, May 17, 2011 at 10:38, Matthew Woodward <> wrote:
> We have two CouchDB servers behind a load balancer and based on some
> behavior I'm seeing I had a question about how views get generated in
> that kind of setup.
> When I create a new view and hit each server in the cluster
> individually, it of course takes a while for the view to be created
> initially, which is expected.
> What's unexpected (at least to me) is that when I hit the cluster,
> even if the views have already been created on each individual server
> it seems (based on the time it takes for the view to return data) that
> they have to be created again.
> Also, based on behavior I was seeing this morning, it seems that the
> view has to be created for each server in the cluster even if you're
> hitting the cluster URL/IP.
> To make this more concrete, assume cluster is the URL for the load
> balancer, and couch1 and couch2 are the individual servers.
> 1. hit server1 -> view index is created
> 2. hit server2 -> view index is created
> 3. hit cluster -> time delay while view index is created even though
> it already has been created on server1 and server2
> 4. hit cluster again -> if I happen to get bounced to the server I
> didn't hit in 3 above, there's another delay while (presumably) the
> view index is created
> Is there something to do with the host name that ties into views that
> would be causing this behavior?

There is nothing tying views to hostnames.

> Happy to provide additional details if necessary.
> Thanks.
> --

If you can think of any more details that are relevant, please post them.
Are you sure that your views are being re-indexed?
When you experience the delay through the load balancer do you see
indexing in /_active_tasks on that node?
What is your load balancer? Perhaps it's buffering the reply.
> Matthew Woodward
> / Twitter: @mpwoodward
> Please do not send me proprietary file formats such as Word,
> PowerPoint, etc. as attachments.

View raw message