read-operations-only: is there way have mongodb replica set, make mongodb instance on box connected to, mongodb gets queried? i have 3 ec2 instances behind aws load balancer. on each ec2 instance runs mongodb, part of replica set. i have express endpoints on nodejs , connect replica set follows mongodb.mongoclient.connect('mongodb://1.1.1.1,2.2.2.2,3.3.3.3.', function (err, db) { if (err) { complete('{}'); } else { i distribute load of queries evenly across 3 instances of mongodb replica set instead of default having queries routed ec2 instance primary mongodb defined, because destroys point of load balancer (which balance load of queries across 3 instances evenly). my understanding when connecting mongodb replica set, primary instance selected unless primary instance down, , therefore purpose of every secondary instance serve backup. in example people call hot,cold,cold. because there 2...
i trying have ios application read json generated rails server. now, having text file, eventual goal retrieved via route. the ios application throwing errors trying read (which generated as_json): {"created_at"=>fri, 16 aug 2013 13:21:07 utc +00:00, "gender"=>"m", "id"=>1, "location_id"=>1, "max_hit_points"=>nil, "my_name"=>"jim bob", "npc_type_id"=>nil, "universe_id"=>1, "updated_at"=>fri, 16 aug 2013 13:21:07 utc +00:00} when give json validator ( http://jsonformatter.curiousconcept.com ) i several errors everything, how has "=>" rather colon. am doing weird? why rails seem not generate valid json? there somehow multiple types of valid json (arrows vs colons?) how can make generate json ios app (or validator) likes? as_json used prepare hash suitable json rendering. ( see doc ) you need call to_json real...