Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Aphyr
It's not an intrinsic property of HTTP... more that some of the HTTP libraries the clients are built on can have awkward semantics for using connections efficiently. Sounds like you've already addressed this, which is great. Mochiweb + HTTP parsing + mime-multipart will introduce some time/spac

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
I don't see that multiplexing or TCP setup is specific to HTTP. The only difference between protobuf and HTTP is what goes on the wire. Not how the wire is managed. (and with that said, the Python client managed the wire in the most horrible ways imaginable for the HTTP Client; I've since fixed t

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Aphyr
Internode times in our datacenter at SL are indistinguishible from loopback; TCP/IP processing dominates. HTTP, on the other hand, involves either in-depth connection management/multiplexing, or TCP/IP setup/teardown latency at either end of a request. In read-write heavy apps, protobufs outper

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
On Oct 4, 2011 7:01 PM, "Mike Oxford" wrote: > > You'll want to run protobufs if you're looking to optimize your > response time; HTTP sockets (even to localhost) will require much more > overhead and time. Hmm? The protocol seems moot, compared to inter-node comms when r > 1. Protocol parsing ju

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
On Oct 4, 2011 7:04 PM, "Mike Oxford" wrote: > > On Tue, Oct 4, 2011 at 3:59 PM, Greg Stein wrote: > > Regarding security: it is the same for option A and B and C (you're > > just shifting stuff around, but it is pretty much all the same). Put > > your webservers in one security group, and the Ri

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Kev Burns
I'd also choose option A for infrastructure simplicity and more reliable stats for capacity planning. 5 node n=3 is a very well understood starting point. - Kev On Oct 4, 2011 2:06 PM, "O'Brien-Strain, Eamonn" < eamonn.obrien-str...@hp.com> wrote: > I am contemplating two different architectures f

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Mike Oxford
On Tue, Oct 4, 2011 at 3:59 PM, Greg Stein wrote: > Regarding security: it is the same for option A and B and C (you're > just shifting stuff around, but it is pretty much all the same). Put > your webservers in one security group, and the Riak nodes in another. > Open the Riak ports *only* to the

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Jeremiah Peschka
The only thing I have to add is that I'd avoid option B like the plague. Spinning up and spinning down nodes in a cluster is going to result in a lot of gossip around the ring, especially when we already know that comms in AWS are a bit spotty. I'm assuming that you're not talking about elastic

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Mike Oxford
You'll want to run protobufs if you're looking to optimize your response time; HTTP sockets (even to localhost) will require much more overhead and time. Even better would be unix sockets if they're available, and you can bypass the whole TCP stack. I would go A over B. Less thrash, more control,

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
I'm with Kyle on this one. Even better, my 'newhttp' branch on Github enables this kind of multiple-connection and automatic fail-over. That branch does have a basic sketch for automatic addition/removal of Riak nodes as you manipulate your cluster. I'll need it one day, but not "now", so I haven'

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Aphyr
Option C: Deploy your web servers with a list of hosts to connect to. Have the clients fail over when a riak node goes down. Lower latency without sacrificing availability. If you're using protobufs, this may not be as big of an issue. --Kyle On 10/04/2011 02:04 PM, O'Brien-Strain, Eamonn wro

Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread O'Brien-Strain, Eamonn
I am contemplating two different architectures for deploying Riak nodes and web servers. Option A: Riak nodes are in their own cluster of dedicated machines behind a load balancer. Web servers talk to the Riak nodes via the load balancer. (See diagram http://eamonn.org/i/riak-arch-A.png ) Op

Re: The power of the siblings....

2011-10-04 Thread Andy Skelton
Ryan Zezeski wrote: > Mike Oxford wrote: >> The big "problem" is that you have to have "knowledge of the buckets" >> to later correlate them. Listing buckets is expensive. > > I'm not sure if you realize this but "bucket" is really just a namespace in > the key.  Said another way =/.  The is > wha

Re: The power of the siblings....

2011-10-04 Thread Mike Oxford
Good info; thanks for taking the time to respond! I can use now/0 and shard on the mod to spread them out in a sub-second spread. The only thing stopping me from doing so was that I'm lazy and didn't want to have to write the correlation aspect over that many buckets if I didn't have to. Enough o

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Ian Plosker
On Oct 4, 2011, at 10:16 AM, Roland Karlsson wrote: > Thanx! > > H ... is this mapping / riak-version <--> riakc-version documented > anywhere? > Maybe via a protocol number ... > > /Roland Roland, You can check the `rebar.config` in the riak_kv repository (https://github.com/basho/riak

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Roland Karlsson
Thanx! H ... is this mapping / riak-version <--> riakc-version documented anywhere? Maybe via a protocol number ... /Roland - Original Message - From: "Ian Plosker" To: "Roland Karlsson" Cc: riak-users@lists.basho.com Sent: Tuesday, October 4, 2011 2:50:30 PM Subject: Re: Delete

Re: Not updateable buckets

2011-10-04 Thread Anton Podviaznikov
Thank you for the tip with reverse proxy. Best regards, Anton Podviaznikov On 4 October 2011 15:26, Sean Cribbs wrote: > Anton, > > No, that is not possible directly in Riak. However, if you use a reverse > proxy in front of Riak, you could restrict HTTP methods to only POST, for > instance, an

Re: Not updateable buckets

2011-10-04 Thread Sean Cribbs
Anton, No, that is not possible directly in Riak. However, if you use a reverse proxy in front of Riak, you could restrict HTTP methods to only POST, for instance, and filter out requests where the key is included in the URL. An appropriate response from the proxy might be a 403 for invalid URL/m

Re: Erlang Map/Reduce error

2011-10-04 Thread Sean Cribbs
Note that add_paths must be a list of paths, e.g. {add_paths, ["/path/to/your/ebin","/path/to/your/other/ebin"]}. On Tue, Oct 4, 2011 at 5:24 AM, Kresten Krab Thorup wrote: > The error badfun most likely means that the function's code is not > available inside Riak. > > You need to add {add_paths

Re: The power of the siblings....

2011-10-04 Thread Ryan Zezeski
On Tue, Oct 4, 2011 at 12:07 AM, Mike Oxford wrote: > SSDs are an option, sure. I have one in my laptop; we have a bunch > of X25s on the way already for the servers. Yes, they're good. But > IOPS is not the core issue since the whole thing can sit in RAM > which is faster yet. Disk-flush "la

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Ian Plosker
Roland, There were a number of changes to the protocol buffers API between versions 0.14 and 1.0. Therefore, if you send messages using fields introduced in 1.0, 0.14.2 will have trouble decoding the message. Riak 0.14.2 should be used with riakc 1.1; Riak 1.0 should be used with riakc 1.2. Ia

Not updateable buckets

2011-10-04 Thread Anton Podviaznikov
Hi, I have question regarding buckets configuration. I want to be able just to save some document to bucket but not update it or delete. E.x. history bucket in which just read-only revisions will be stored. Is it possible to make it via bucket configuration inside riak? -- Best regards, Anto

Re: Building a native Riak executable

2011-10-04 Thread Bryan Fink
On Tue, Oct 4, 2011 at 4:29 AM, Olivier Rossel wrote: > I need to deploy Riak on a Linux server with no Erlang VM. > Is there a procedure to build a native Riak executable on my own Ubuntu > so I can deploy it on this server? > Which Erlang .deb packages are required on my Ubuntu to build this nat

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Roland Karlsson
I use riakc vsn=1.2.0. The same as I used for riak 0.14 Thats the current "master" branch on github. Is that the right version for riak 0.14 ? Is that the right version for riak 1.0 ? NOTE - this client can connect to both 0.14 and 1.0. But on 0.14 the get with the argument deletedvclock disconne

Re: Building a native Riak executable

2011-10-04 Thread OJ Reeves
Hi Olivier, What I do in this scenario is - Build a VM which is running the same operating system as your target server. Let's say you're deploying to a 64-bit Arch Linux machine, that's the exact flavour of OS that you set up on the VM. - Install the required version of Erlang. -

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Roland Karlsson
Another comment I also tried an implementation of the test code where delete waited in a loop as long as the tombstone was still there. But as far as I can see it might then wait forever. Or at least several minutes - until I did not care to wait any longer. Is that so - an a tombstone exist fore

Re: Delete takes 5 seconds in riak 1.0 ???

2011-10-04 Thread Roland Karlsson
OK - thanx. I wrote a put function that looks like this. It works in 1.0 - but I get disconnected if I connect to an 0.14 server and try to use it. Does it look OK? put(Pid, Bucket, Key, Value) -> Obj2

Re: Erlang Map/Reduce error

2011-10-04 Thread Kresten Krab Thorup
The error badfun most likely means that the function's code is not available inside Riak. You need to add {add_paths, "/path/to/your/ebin"} in the riak_kv section in app.config. Read more about it here http://wiki.basho.com/MapReduce.html#MapReduce-via-the-Erlang-API For an explanation of why

Erlang Map/Reduce error

2011-10-04 Thread Lyes Amazouz
Hi everybody, I'm learning how to execute a map/reduce using the riak_client module, so I tried this: >Map = fun(O, undefined, none) -> [riak_object:get_value(O)] end. >C:mapred([{<<"buck">>, <<"key1">>}, {<<"buck">>, <<"key2">>}], [{map, {qfun, Map}, none, true}]). but I got this error: {erro

Building a native Riak executable

2011-10-04 Thread Olivier Rossel
Hi all. I need to deploy Riak on a Linux server with no Erlang VM. Is there a procedure to build a native Riak executable on my own Ubuntu so I can deploy it on this server? Which Erlang .deb packages are required on my Ubuntu to build this native Riak? Any help is very welcome. PS: I am *absolu