New ‘Mass Effect 2’ box art
The game i am waiting for month !! I can’t wait to play this game :)
5 days ago
New ‘Mass Effect 2’ box art
The game i am waiting for month !! I can’t wait to play this game :)
5 days ago5 days agoOne nice feature with MongoDB is that updates can happen “in place” — the database does not have to allocate and write a full new copy of the object.
This can be highly performant for frequent update use cases. For example, incrementing a counter is a highly efficient operation. We need not fetch the document from the server, we can simply send an increment operation over:
db.my_collection.update( { _id : ... }, { $inc : { y : 2 } } ); // increment y by 2MongoDB disk writes are lazy. If we receive 1,000 increments in one second for the object, it will only be written once. Physical writes occur a couple of seconds after the operation.
One question is what happens when an object grows. If the object fits in its previous allocation space, it will update in place. If it does not, it will be moved to a new location in the datafile, and its index keys must be updated, which is slower. Because of this, Mongo uses an adaptive algorithm to try to minimize moves on an update. The database computes a padding factor for each collection based on how often items grow and move. The more often the objects grow, the larger the padding factor will be; when less frequent, smaller.
See also:
http://www.mongodb.org/display/DOCS/Updating
http://blog.mongodb.org/post/171353301/using-mongodb-for-real-time-analytics
A little holiday present: 10,000 reqs/sec with Nginx!
Updated Dec 19 at 05:15 CDT (first posted Dec 18 at 06:01 CDT) by Remi in General - 11 comment(s)
A few weeks ago we quietly started to configure our new machines with Nginx as the front web server instead of Apache (we still run Apache behind Nginx for people who need all the features from Apache).
Here is a little benchmark that I did to compare Nginx versus Apache (with the worker-MPM) for serving a small static file:
This benchmark is not representative of a real-world application because in my benchmark the web servers were only serving a small static file from localhost (in real life your files would get served to remote machines and some of your requests would be dynamic) but the results are impressive nonetheless. Both servers are capable of serving a huge number of requests per second, but Apache’s performance start decreasing as you add more concurrent connections whereas Nginx’s performance almost doesn’t drop!
But here comes the best bit: because Nginx is event-based it doesn’t need to spawn new processes or threads for each request, so its memory usage is very low. Throughout my benchmark it just sat at 2.5MB of memory while Apache was using a lot more:
To take advantage of the lightning speed of Nginx we have added two new types of applications to our control panel: the “static only” app and the “symlink to static-only” app. They just work like a normal “static/cgi/php” and “symlink to static/cgi/php” app, except that they can only serve purely static content (no .htaccess support) and they are served directly by the front Nginx server.
Even if your site is not static you can still serve all your static data (CSS, javascript, images, …) directly from Nginx and enjoy the speed gain.
Nginx is only available on Web57 and over. If you’re on an older server and would like to use Nginx open a ticket and we’ll give you an extra plan on a new Nginx server and a free week to transfer your data.
Nginx FTW!
[Updated December 19th, 2008 to clarify the fact that we still run Apache behind Nginx for people who need all the Apache features]
11 comments:
Super Frank said on 2008-12-18 10:28:05:Awesome! You guys just keep getting better and better!
Andrew Bates said on 2008-12-18 18:23:04:Nginx sounds pretty cool. Now I just need to make my app as fast as Nginx…
Michael Warkentin said on 2008-12-25 00:29:20:Nice! Thought that the static-only apps were new..
glebk said on 2009-01-13 20:39:52:That’s a good beginning.
Btw, have you thought of using lighttpd instead of apache for a Django platform? it can save lots of resources
Sean said on 2009-01-14 11:53:46:@glebk - if enough users ask for a Django+lighttpd installer, we’ll certainly provide one. Until then if anyone wants to run that, they’re free to run it as a custom app :)
Jim said on 2009-01-28 22:21:15:your upgrade brought down my site, ugh
Sean said on 2009-01-29 08:14:59:@Jim - Really? That should not have happened. If you’re having a problem with your site, please log in to the control panel and open a support ticket, we’ll be happy to take a look.
Brent said on 2009-02-03 18:23:44:Is nginx running on top of apache? or the other way around? Do any of the apache processes run slower because of this?From your benchmarks it looks awesome.
b r e n t
Sean said on 2009-02-04 14:30:39:@Brent - Apache runs behind nginx. It ran behind another Apache before this change, so there’s really no difference in the backend Apache’s performance.
chusty said on 2009-05-18 09:13:31:I’m using nginx for quite a long time now … and I’m really happy because of that :).Wow, I missed that. I was waiting for this.
I might just switch to one of these servers after my holiday.
The next step would be lighttpd and varnish.Great work!
Leave a new comment:
(Note: comments may be moderated)
A very good benchmark indeed but i am wondering about nginx’s cpu resource consumption. Does anyone have an idea ?
Posted via web from jppommet’s posterous | Comment »
1 week agoThey are amazing !! :D
Posted via web from jppommet’s posterous | Comment »
3 weeks agoLet’s make the web faster !
5 months agoWatch the HTC hero video demo ! Neat and smooth user interface :)
5 months agoA very cool website where you can choose a skin to customize your iPhone, iPod, laptop, wall and cars !I cant wait to get one that will emphasize the apple logo on my mac huhu ^^
5 months ago