Skip to content

Instantly share code, notes, and snippets.

Tests to do:

Create an environment with 4 (at least >2) servers each running a single process with 40 writing threads. Each writing thread should insert a new document at some prescribed rate (maybe make the threads and the document insertion a configuration parameter?)

Have each of these servers writing to one or more of the nosql "servers" (depending on architecture) -- maybe run one test where all the writes are going to one server, and another where they are spread.

Then lets see how long it takes for each of the servers in a cluster to "catch up" (e.g. what is the lag time average and std dev -- if thats even possible to compute) before a new document is replicated around.

Once we have a feel for this, lets repeat the test but pull one server out of the replication environment. We should do this test twice, once where we remove the server gracefully and once violently. In both cases we'll leave the server "offline" for several tens-of-minutes or hours. Then lets compute the number of documents th

APACHE:
$ ab -k -c 50 -n 20000 http://127.0.0.1/statread.js 2>&1 | grep "Requests per second"
Requests per second: 12370.69 [#/sec] (mean)
NGINX:
$ ab -k -c 50 -n 20000 http://127.0.0.1/statread.js 2>&1 | grep "Requests per second"
Requests per second: 20262.73 [#/sec] (mean)
NODE:
$ ab -k -c 50 -n 20000 http://127.0.0.1:8000/statread.js 2>&1 | grep "Requests per second"
import scala.collection.mutable._
// I want these std functions to be implicit:
implicit def tupled[a1, a2, b] = Function.tupled[a1, a2, b](_)
implicit def untupled[a1, a2, b] = Function.untupled[a1, a2, b](_)
class Connection
class ConnectionPool(size: Int) {
def withConnection[A](f: Connection => A) = f(new Connection)
@zaach
zaach / Gemfile
Created February 19, 2010 05:27 — forked from indirect/Gemfile
# include at least one source and the rails gem
source :gemcutter
gem "rails", "~> 2.3.5", :require => nil
gem "sqlite3-ruby", :require => "sqlite3"
group :development do
# bundler requires these gems in development
gem 'rails-footnotes'
end
@zaach
zaach / workflow.md
Created January 26, 2010 21:10 — forked from gstark/workflow.md

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@zaach
zaach / gist:221544
Created October 29, 2009 15:58 — forked from teeler/gist:205407
(* a simple echo server in ocaml
* -----------------------------
* uses a high level networking function, similar to SocketServer
* in python, called 'establish_server', see here:
* http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html#VALestablish_server
*)
(*
our echo function
in -> out -> unit
Let's make a list of Sinatra-based apps!
Apps:
- http://github.com/cschneid/irclogger "Sinatra based irclogger.com"
- http://github.com/rtomayko/wink "minimalist blogging engine"
- http://github.com/foca/integrity "The easy and fun Continuous Integration server"
- http://github.com/sr/git-wiki "git-powered wiki"
- http://github.com/entp/seinfeld "Seinfeld-inspired productivity calendar to track your public github commits."
- http://github.com/karmi/marley "Marley, the blog engine without <textareas>."
- http://github.com/ichverstehe/gaze "Serve up your Markdown files with this tiny Sinatra app!"