Hiển thị các bài đăng có nhãn minutes. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn minutes. Hiển thị tất cả bài đăng

Thứ Năm, 3 tháng 5, 2012

0 MongoDB at Craigslist: 1 Year Later




MongoDB at Craigslist: 1 Year Later


Comments
   


21 minutes ago


Last year, Craigslist moved their archive to MongoDB from MySQL. After the initial set up, we spoke with Jeremy Zawodny, software engineer at Craigslist and the author of High Performance MySQL (O’Reilly), and asked him some questions about their cluster. In advance of their talk at MongoSF tomorrow, we caught up with Jeremy to get the scoop on what’s happening at Craigslist one year later. 


Last time we spoke you were building a MongoDB store for 5 Billion Documents. What do your numbers look like now?


We’re currently approaching the 3 billion mark. The 5 billion number was our target capacity when building the system. Back then we had about 2.5 billion documents that we migrated into MongoDB, and we’ve continued to add documents ever since then.


Can you share an anecdote on the benefits of replica sets/sharding and something you’d like to change/improve in that feature set?


The sharding has made it easy for handling growth. We know that when the day comes, we can add an additional replica set to our cluster and it will help ease any space crunch. The replica sets have been great for handling machine failures. We’ve had several machines lock-up on us and require unplanned reboots or service. Throughout that time, the worst thing we’ve seen is some read-only time for the cluster metadata (when a config server dropped) but we’ve been able to serve requests without stopping.


Can you share some anecdotes about how your team adjusted to working with MongoDB?


There was a bit of adjustment that our systems administration team performed to the original deployment and configuration to make it better mesh with our home-grown management and deployment tools. But other than that, MongoDB has been pretty hands-off for most of the team. As long as it behaves well (which it does), we don’t need to touch it that often.


Any exciting plans for your MongoDB clusters?


We’ve been testing MongoDB in a few new roles at Craigslist and plan to present some of those challenges at MongoSF on May 4th. 


Thanks to Jeremy for giving us some insight into how MongoDB powers Craigslist! 




Source : http://blog.mongodb.org/post/22327647691/mongodb-at-craigslist-1-year-later

Thứ Tư, 2 tháng 5, 2012

0 MongoDB: Powering the Magic (and the Monsters) at Stripe




MongoDB: Powering the Magic (and the Monsters) at Stripe


Comments
   


30 minutes ago


Stripe offers a simple platform for developers to accept online payments. They are a long-time user of MongoDB and have built a powerful and flexible system for enabling transactions on the web. In advance of their talk at MongoSF on MongoDB for high availability, Stripe’s engineer, Greg Brockman spoke with us about what’s going on with MongoDB at Stripe.






Stripe has a heavy write load with large query volumes. Can you give us some insight into your tips and tricks for wrangling with MongoDB’s replica sets on your system?


Getting replica sets up and running is actually incredibly easy. I used to run MySQL clusters where configuring and maintaining replication was a pain, and it was a joy to just be able to run “rs.add(node)” and watch it join the cluster.


In order to avoid losing any operations even if we lose our database primary, we structure our application such that all writes are idempotent. We then wrap our calls to the MongoDB driver in a retry block. If the call fails because our MongoDB cluster is currently reconfiguring, we try the operation again (with the usual backoff and timeout you’d expect from a scheme like this). We’re very careful to avoid operations which could result in evicting hot data from the cache. Running unindexed queries is an obvious example of this, but we’ve also found that running a large multi-update can have production impact.


So when we need to change our schema for an entire collection of documents, we’ll usually run a slower (but non-impactful) document-by-document migration at the application level.


Let’s take a step back to your past talk at MongoSV ‘11 — what are you doing with Monster (Stripe’s native events processing system for payments)?


Monster is our framework for event production and event consumption, which uses MongoDB as a highly-available, persistent queue. With Monster, our engineers can start logging a new type of event with only a few lines of code, and at any time in the future can add a consumer that will automatically be passed relevant events (possibly even historical ones). We use it for a variety of purposes: structured logging, incremental updating of state (such as people’s graphs of payment volume), and background jobs.


Lots of people are innovating in the financial space — in particular building APIs for mobile payments. For those just starting up, why should they use MongoDB?


As a payments processor, our uptime is incredibly important. We were initially drawn to MongoDB because replica sets make it incredibly easy to run your database in a highly-available fashion. I came from a world where my database master could never be rebooted, since there was no zero-downtime failover strategy even for routine maintenance — MongoDB gives you this almost out of the box.


MongoDB also makes it easy to do zero-downtime migrations, with features such as background index builds and allowing multiple schemas in a single collection. Anyone caring about their availability should look very hard at MongoDB.


How are you guys using the Ruby driver in your system? Anything interesting?


We’ve banged on the Ruby driver in a variety of configurations, ensuring that it behaves properly when exposed to all the possible failures we can imagine (or have noticed) our database servers experiencing. These days, we’re very happy with how robust the Ruby driver is against the wide variety of failure modes of the distributed MongoDB nodes.


What’s your wish list for the Ruby Driver?


I wish there were a configuration option for forcing reads from a secondary. (Right now, you can request that reads be on a secondary if one is available, but they’ll start reading from the primary if no secondary is available.)


What’s on stripe’s engineering roadmap?


While making Stripe available outside the US is our top priority, our biggest engineering challenges at the moment are scaling our systems to keep up with the phenomenal growth we’ve been experiencing.


Many thanks to Greg for taking the time to tell a bit about the magic at Stripe.




Source : http://blog.mongodb.org/post/22280693621/mongodb-powering-the-magic-and-the-monsters-at

Thứ Ba, 1 tháng 5, 2012

0 Revamp of MongoDB’s Documentation

Revamp of MongoDB’s Documentation


Comments
   


8 minutes ago


We’re revamping MongoDB’s documentation. The new design in the MongoDB Manual has an improved reference section and an index for simplified search. It will also eventually support multiple MongoDB versions at the same time.


This project is a work in progress, and things are changing quickly. Our goal is to consolidate, sharpen, organize, and continue to improve the documentation in support of MongoDB. For now, the new docs will live alongside the original MongoDB Wiki. But over the next few months, we’ll be transitioning everything to the new manual.


In the spirit of open source, the docs are housed on Github. Feedback is welcome! Feel free to fork the repository and issue pull requests. You can also open tickets in JIRA, and we’ll promptly address any suggestions.


Source : http://blog.mongodb.org/post/22199152764/revamp-of-mongodbs-documentation

Thứ Sáu, 27 tháng 4, 2012

0 Meet Variety, a Schema Analyzer for MongoDB

Meet Variety, a Schema Analyzer for MongoDB


Comments
   


3 minutes ago


Variety is a lightweight tool which gives a feel for an application’s schema, as well as any schema outliers. It is particularly useful for


• quickly learning how data is structured, if inheriting a codebase with a production data dump


• finding all rare keys in a given collection


An Easy Example


We’ll make a collection, within the MongoDB shell:


db.users.insert({name: "Tom", bio: "A nice guy.", pets: ["monkey", "fish"], someWeirdLegacyKey: "I like Ike!"});

db.users.insert({name: "Dick", bio: "I swordfight."}); db.users.insert({name: "Harry", pets: "egret"});

db.users.insert({name: "Geneviève", bio: "Ça va?"}); END JAVASCRIPT

Let’s use Variety on this collection, and see what it can tell us:


$ mongo test --eval "var collection = 'users'" variety.js

The above is executed from terminal.”test” is the database containing the collection we are analyzing.


Variety’s output:


{ "_id" : { "key" : "_id" }, "value" : { "types" : [ "object" ] }, "totalOccurrences" : 4, "percentContaining" : 100 }

{ "_id" : { "key" : "name" }, "value" : { "types" : [ "string" ] }, "totalOccurrences" : 4, "percentContaining" : 100 }

{ "_id" : { "key" : "bio" }, "value" : { "types" : [ "string" ] }, "totalOccurrences" : 3, "percentContaining" : 75 }

{ "_id" : { "key" : "pets" }, "value" : { "types" : [ "string", "array" ] }, "totalOccurrences" : 2, "percentContaining" : 50 }

{ "_id" : { "key" : "someWeirdLegacyKey" }, "value" : { "type" : "string" }, "totalOccurrences" : 1, "percentContaining" : 25 }

Every document in the “users” collection has a “name” and “_id”. Most, but not all have a “bio”. Interestingly, it looks like “pets” can be either an array or a string. The application code really only expects arrays of pets. Have we discovered a bug, or a remnant of a previous schema? The first document created has a weird legacy key I’ve never seen before- the people who built the prototype didn’t clean up after themselves. These rare keys, whose contents are never used, have a strong potential to confuse developers, and could be removed once we verify our findings. For future use, results are also stored a varietyResults database.


Learn More!


Learn more about Variety now, including


• How to download Variety


• How to set a limit on the number of documents analyzed from a collection


• How to contribute, and report issues


Variety is free, open source, and written in 100% JavaScript. Check it out on Github.


-by James Cropcho


Source : http://blog.mongodb.org/post/21923016898/meet-variety-a-schema-analyzer-for-mongodb
 

Everything for nosql Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates