Tengine, a customized Nginx, goes to open source

We’re glad to announce that Tengine, our home-baked Nginx at Taobao now becomes an open source project.

Taobao is the largest e-commerce website in Asia and ranked #12 on Alexa’s top global sites list. Our website serves billions of pageviews per day. For busy website as us, Nginx is obviously the best choice. Thanks to Nginx’s high performance, small footprint and flexibility, we have done more with less.

We first learned the Nginx internals by using it as a traditional web server and developing dozens of modules. Then from June of this year we started hacking the Nginx core to expand its capabilities. As some of the features we have developed may also benefit other Nginx users and websites, so why not open source them? We do not want to be just open source software users, but also open source contributors. That’s why the Tengine open source project came out.

Tengine is based on the latest stable version of Nginx (Nginx-1.0.10). There are a few features and bug fixes you may be interested in Tengine:

  • Logging enhancement. It supports syslog (local and remote) and pipe logging. You can also do log sampling, i.e. not all requests have to be written.
  • Protects the server when the system load and memory use goes high.
  • Combines multiple CSS or JavasScript requests into one request to reduce the downloading time.
  • Sets the worker process number and CPU affinities automatically. Setting Nginx’s worker_cpu_affinity is not a pain any more.
  • Enhanced limit_req module with whitelist support and more limit_req directives in one location.
  • More operations engineer friendly server information, so host can be located easily when error happens.
  • More command lines support. You can list all modules compiled in and the directives supported, even the content of configuration file itself.
  • Set expiration for files according to specific content type.
  • Error pages can be set back to ‘default’.

Basically, Tengine can be considered as a better or superset of Nginx. You can download the tar ball here:

We want to say thank you to the Nginx team, especially to Igor. Thank you very much for your great work! We would love to donate the patches against the Nginx-1.1 branch later if you think the patches are okay.

Frankly, I’m not sure whether the features in Tengine right now can impress you guys or not. It’s the first step we moving towards open source after all. We have built a team working on Tengine and have quite a long to-do list. I promise you more enhancements are coming out.


  1. Susan Potter said,

    December 4, 2011 @ 6:23 am

    Joshua, thanks for open sourcing your fork. I was wondering if you could elaborate on the following two items (or point me to the commits or issues that contain this detail already):
    * “Protects the server when the system load and memory use goes high.”
    * “More operations engineer friendly server information, so host can be located easily when error happens.”

    Also have you considered publishing to GitHub or BitBucket where the issues and repository UIs are obvious to more open source developers? Is there an issue tracker for this project or just a mailing list?

    Thanks for all your hard work.


  2. Joshua Barnsdale said,

    December 24, 2011 @ 4:42 am

    I’m really happy that Tengine became open source:D Another addition to the growing power of open source software.

  3. Joshua said,

    January 17, 2012 @ 12:06 am

    Sorry for the late response.
    Which Nginx version are you using?
    I can pick out these two patches for you if you are interested :)

  4. halcyonCorsair said,

    March 7, 2012 @ 4:42 pm

    Hi Joshua, is there any reason why you haven’t put the source up on somewhere like github?

  5. Joshua said,

    March 7, 2012 @ 5:42 pm

    Hosting the code on github is the way to go. But we haven’t figured out how to do code review on it yet.
    Here’s a try by one of the tengine team member:

  6. bszbcjsb said,

    June 20, 2012 @ 5:36 pm

    nskjnceksk snfkjsncbkasnfohf sknckuaebfkcns feoafnsfnckjznjke

  7. satellite direct said,

    June 25, 2012 @ 8:27 pm

    Everything is very open with a clear description of the challenges.
    It was really informative. Your website is very useful.
    Thank you for sharing! tv live

  8. applying grout colorant said,

    June 29, 2012 @ 5:25 am

    I’ve recently started a site, and the info you offer on this site has helped me tremendously. Thanx for all of your time & work.

  9. Bulgari Jewelry said,

    June 29, 2012 @ 9:24 pm

    Cheers for this content, guys, continue to keep up the good work.

  10. Heathrow to London said,

    June 29, 2012 @ 10:09 pm

    Hi, i think that i saw you visited my site thus i came to “return the favor”.I’m attempting to find things to enhance my site!I suppose its ok to use a few of your ideas!!

  11. Elaine Hartly said,

    July 2, 2012 @ 2:36 pm

    F*ckin’ remarkable things here. I am very glad to see your article. Thanks a lot and i am looking forward to contact you. Will you kindly drop me a e-mail?

  12. http://www.freebootlegmovies.org/ said,

    July 3, 2012 @ 1:47 am

    Great site. Lots of useful information here. I’m sending it to a few friends ans additionally sharing in delicious. And certainly, thank you in your effort!

  13. Challenge Coins said,

    July 3, 2012 @ 2:23 am

    I just found your site and want to say many many congratulations that yo have a good and contains on quality work site keep update it as you can.

  14. grout paint said,

    July 4, 2012 @ 9:58 am

    I have recently started a site, and the information you provide on this web site has helped me greatly. Thanx for all of your time & work.

  15. pozycjonowanie stron internetowych kraków said,

    July 4, 2012 @ 10:39 am

    Good blog! I really love how it is easy on my eyes and the data are well written. I am wondering how I could be notified when a new post has been made. I have subscribed to your RSS feed which must do the trick! Have a great day! “You can discover what your enemy fears most by observing the means he uses to frighten you.” by Eric Hoffer.

  16. Jere Tautuiaki said,

    July 4, 2012 @ 2:22 pm

    Hi there. I found your site by means of Google at the same time as looking for a related matter, your web site got here up. It appears good. I have bookmarked it in my google bookmarks to visit later.

  17. Bottega Veneta Sale said,

    August 8, 2012 @ 8:34 pm

    This article may possibly be mentioned on Twitter by someone. genuinely?

  18. Coach Coupons said,

    August 8, 2012 @ 11:56 pm

    Curious to determine what all you intellectuals need to say about this?-?-.

  19. Mammie Hannah said,

    August 9, 2012 @ 4:46 am

    I definitely wanted to make a small note to be able to say thanks to you for all the lovely hints you are giving at this site. My prolonged internet investigation has now been rewarded with reliable facts and techniques to share with my two friends. I ‘d mention that most of us site visitors actually are rather endowed to exist in a magnificent website with very many wonderful people with good guidelines. I feel rather blessed to have come across your weblog and look forward to tons of more cool minutes reading here. Thanks a lot again for everything.

  20. Celine Purse said,

    August 14, 2012 @ 7:59 pm

    Cheers for this content, guys, continue to keep up the good work.

  21. Celine Purse said,

    August 23, 2012 @ 11:06 pm

    It really is good to possess the capacity to examine a great high quality article with practical specifics on topics that plenty are interested on. The stage that the information indicated are all first hand on reside experiences even guide a lot more. Proceed performing what you do as we really like readi?-

  22. Indian Mens traditional Sherwani said,

    August 30, 2012 @ 2:48 pm

    satisfy the purchasers revise styles,different qualities, the needs of different colours,Moncler Outlet Store, as well as Moncler among continuous development as well as enhancement.

  23. Cheap Louis Vuitton Outlet said,

    August 31, 2012 @ 12:00 am

    It really is good to possess the capacity to examine a great high quality article with practical specifics on topics that plenty are interested on. The stage that the information indicated are all first hand on reside experiences even guide a lot more. Proceed performing what you do as we really like readi?-

  24. Louis Vuitton Outlet Shopping said,

    September 2, 2012 @ 6:23 am

    Me and my friend were arguing about an problem similar to this! Now I realize that I had been correct. lol! Thank you for that information you article.

  25. Louis Vuitton Purses Outlet said,

    September 2, 2012 @ 12:17 pm

    Many thanks for your good publish. I’ll take the notes you’ve written.

  26. Cheap Louis Vuitton Outlet said,

    September 3, 2012 @ 7:26 pm

    I admire the valuable info you offer you inside your articles. I’ll bookmark your website and have my kids examine up the following typically. I am really confident they will understand a lot of new stuff below than anybody else!

  27. celine boston said,

    September 24, 2012 @ 10:46 am


  28. mat said,

    September 28, 2012 @ 6:03 pm

    finish my cv writing

  29. Syble Mcintire said,

    October 19, 2012 @ 3:31 pm

    excellent post, very informative. I wonder why the other experts of this sector do not notice this. You must continue your writing. I am sure, you have a great readers’ base already!

  30. Andra Kudro said,

    October 19, 2012 @ 9:56 pm

    I would like to thnkx for the efforts you’ve put in writing this blog. I am hoping the same high-grade site post from you in the upcoming as well. Actually your creative writing abilities has inspired me to get my own website now. Actually the blogging is spreading its wings quickly. Your write up is a good example of it.

  31. Edith Bonser said,

    October 19, 2012 @ 10:22 pm

    What i do not realize is actually how you’re not really much more well-liked than you may be right now. You are so intelligent. You realize therefore considerably relating to this subject, made me personally consider it from a lot of varied angles. Its like men and women aren’t fascinated unless it is one thing to accomplish with Lady gaga! Your own stuffs excellent. Always maintain it up!

  32. Ivonne Schwamberger said,

    October 19, 2012 @ 10:53 pm

    Thanks so much for giving everyone an extremely memorable possiblity to check tips from this website. It really is very ideal plus packed with a good time for me and my office colleagues to visit your website at the very least thrice per week to learn the new items you have got. And lastly, I am certainly contented with the impressive opinions served by you. Some 4 tips in this post are in truth the finest we have all had.

  33. Lavelle Well said,

    October 22, 2012 @ 7:44 pm

    This web page can be a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse right here, and you’ll positively uncover it.

  34. Kallie Freimuth said,

    October 23, 2012 @ 4:41 am

    whoah this blog is wonderful i love reading your articles. Keep up the good work! You know, a lot of people are searching around for this information, you could help them greatly.

  35. Olive Tupaj said,

    October 23, 2012 @ 4:53 am

    Hey, you used to write magnificent, but the last several posts have been kinda boring… I miss your tremendous writings. Past few posts are just a little out of track! come on!

  36. Shizuko Neumiller said,

    October 25, 2012 @ 10:24 am

    Wow! This could be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Wonderful. I’m also a specialist in this topic therefore I can understand your effort.

  37. Shaun Beierschmitt said,

    October 26, 2012 @ 5:25 am

    There are some attention-grabbing time limits on this article however I don’t know if I see all of them heart to heart. There is some validity but I will take hold opinion until I look into it further. Good article , thanks and we want more! Added to FeedBurner as properly

  38. Sybil Mccalpane said,

    October 26, 2012 @ 5:06 pm

    A formidable share, I simply given this onto a colleague who was doing just a little analysis on this. And he actually bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love studying more on this topic. If doable, as you become expertise, would you mind updating your weblog with more particulars? It is highly useful for me. Large thumb up for this weblog submit!

  39. Marquerite Merrbach said,

    October 30, 2012 @ 3:48 am

    I’ve read a few good stuff here. Definitely worth bookmarking for revisiting. I surprise how much effort you put to create such a excellent informative site.

  40. Claretta Viscardi said,

    October 30, 2012 @ 7:32 am

    An impressive share, I simply given this onto a colleague who was doing a little bit analysis on this. And he in actual fact bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading extra on this topic. If possible, as you become expertise, would you mind updating your weblog with extra details? It is highly helpful for me. Massive thumb up for this blog put up!

  41. Into Action Drug Rehab said,

    October 31, 2012 @ 4:56 am

    Some truly good posts on this internet site, thanks for contribution. “The spirit is the true self.” by Marcus Tullius Cicero.

  42. Corporate Rentals said,

    December 17, 2012 @ 3:28 pm

    This post is informative for me and all other readers.

  43. e cigarettes said,

    March 16, 2013 @ 3:15 pm

    Now, the level of e cigs doesn’t real old-hat cognition that habitual cig are especially dangerous to your comfortably-being. e cigarettes That is why antismoking groups warn that the more benignant variation of cigarettes will but advance industry tends to fall back.

  44. http://www.paydayloansnocreditcheckkoala.co.uk said,

    April 16, 2013 @ 4:01 am

    “, caf egg timer is simply a plan, installed on your complete computers payday loans no credit check One huge advantage with low interest signature loans is that you can take credit without having to stress about your credit rating in addition to worthiness

  45. loans for bad credit uk said,

    April 20, 2013 @ 5:51 am

    That is why; most lending providers emphasize involving taking some safe and sound steps, so
    that borrowers can’t encounter along with any problem or even loss bad credit loans For the opposite give, if your credit history isn’t complete, the acceptance of the bank loan attributable to often be delayed also it should take weeks to search out

  46. webhosting said,

    April 30, 2013 @ 3:44 pm

    This case of web service is listen to an sound recording Seminar.

    http://www.excellentwebhosting.co.uk Even if the initial price is somewhat higher,
    it is better to register typically does not own the host.

  47. pounds to pocket review said,

    May 4, 2013 @ 7:07 pm

    To fulfill your long terminus of import to make sure you fail to be having to pay an teemingness of finances versus could cause your budget, asset should
    very be barrage fire out. pounds to pocket But of course of study, on that point’s more than to the iPad than exactly but the deficiency of dedicated, canonical productivity applications like these feels like a immense supervision.

  48. http://fiveboroughdefense.com/keep-the-heating-distribution-flowing-at-home-during-the-winter said,

    May 11, 2013 @ 7:21 pm

    Hello, i think that i noticed you visited my web site thus i got here to
    go back the want?.I am trying to to find things to enhance my site!
    I assume its adequate to make use of some of your ideas!

  49. tomcat java said,

    July 10, 2013 @ 10:39 am

    what is the advantage of this fork

  50. westchester escorts said,

    July 23, 2013 @ 3:52 pm

    After looking over a few of the blog posts on your
    website, I really like your way of writing a blog.

    I bookmarked it to my bookmark webpage list
    and will be checking back in the near future.
    Please check out my website as well and tell me how you feel.

  51. Candy Crush said,

    July 26, 2013 @ 11:23 am

    In my opinion, 5 gallons is an ideal quantity to start with.

    In addition to that, here is something else you wouldn’t think of. a haunt query i get is what foods to squander when dieting.

  52. brain control said,

    November 5, 2013 @ 4:42 am

    It was a bon for the women who faced problems during abortions.
    Often, the first things which come to mind when thinking of upgrading your computer are either adding more
    memory modules (RAM) or going for a faster processor (CPU).

    Though each of this target sites can be used for different movement disorder, we believe that these are best for the respective disease as indicated.

  53. best games pc said,

    December 4, 2013 @ 2:19 am

    your blog is actually a real wonderful spot to interact socially, you then have a great deal of well written and entertaining to learn to read articles zero question you then have a excellent pursuing as part of your internet site. I will undoubtedly take a note of this particular and ensure that you often pay attention to improvements Appreciate it because of this post. I am going to take a note of these pages regarding foreseeable future referrals

  54. manifesting said,

    January 28, 2014 @ 4:24 pm

    You never know when you’re going to get a free minute or
    a wild hair of inspiration. Use these questions
    to go deeper within, and identify where and how
    you can make inner changes to open the flow of good into your life.
    In the example previously given, the car is a mode of transportation in both a
    literal and metaphorical sense that serves to transport
    the individual to a desired emotional state.

  55. isochronic tones said,

    February 4, 2014 @ 8:36 pm

    Howdy! I could have sworn I’ve been to your blog before but after browsing through some of
    the articles I realized it’s new to me. Regardless,
    I’m definitely delighted I discovered it and I’ll be bookmarking it and checking
    back often!

  56. tuckerrofe.wordpress.com said,

    March 3, 2014 @ 10:16 am

    If the leakage is left unattended, inhabitants of the home
    because mold and mildewmay mold killer also be found on or under
    surfaces like floors, walls, ceilings and staircases.
    Bleach is capable of inducing several health hazards among human beings.

    Rinse with clean water and 1 cup of bleach to a gallon
    of water. This is characterized by vague symptoms, which can
    be purchased easily from any shop where candle making supplies and kits are available in the
    market. For some individuals, a Bridgeport mold killer type of equipment would suffice.

RSS feed for comments on this post · TrackBack URI

Leave a Comment

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word