# Tengine, a customized Nginx, goes to open source

**URL:** <https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459>\
**Category:** NGINX\
**Created:** [December 2, 2011, 12:02pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459 "2011-12-02T12:02:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [December 2, 2011, 12:02pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/1 "2011-12-02T12:02:30Z")

</div>

Hi guys,

We’re glad to announce that Tengine ([http://tengine.taobao.org](http://tengine.taobao.org)), our  
home-baked Nginx at Taobao now becomes an open source project.

Taobao ([http://www.taobao.com](http://www.taobao.com)) is the largest e-commerce website in Asia  
and ranked #12 on Alexas top global sites list. Our website serves  
billions of page views 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).  
Here  
are a few features and bug fixes you may be interested in Tengine:

1. 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.
2. Protects the server when the system load and memory use goes high.
3. Combines multiple CSS or JavasScript requests into one request to  
reduce  
the downloading time.
4. Sets the worker process number and CPU affinities automatically.  
Setting  
Nginx’s worker\_cpu\_affinity is not a pain any more.
5. Enhanced limit\_req module with whitelist support and more limit\_req  
directives in one location.
6. More operations engineer friendly server information, so host can be  
located easily when error happens.
7. More command lines support. You can list all modules compiled in and  
the  
directives supported, even the content of configuration file itself.
8. Set expiration for files according to specific content type.
9. Error pages can be set back to ‘default’.
10. …

Basically, Tengine can be considered as a better or superset of Nginx.  
You  
can download the tar ball here:  
[http://tengine.taobao.org/download/tengine-1.2.0.tar.gz](http://tengine.taobao.org/download/tengine-1.2.0.tar.gz)

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.

Regards,

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 12:49pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/2 "2011-12-02T12:49:39Z")

</div>

This is good news.

> 1. Combines multiple CSS or JavasScript requests into one request to  
> reduce  
> the downloading time.

This feature would impress me for sure. Right now I am glueing  
javascript/css files using the PHP script, but I’d love to have internal  
server-support for this. Also, features like 2) and 4) are very  
interesting, too. I wonder what nginx authors think of this.

Andrejs

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,219471,219472#msg-219472](http://forum.nginx.org/read.php?2,219471,219472#msg-219472)

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 12:50pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/3 "2011-12-02T12:50:17Z")

</div>

在 2011-12-02五的 19:02 +0800，Joshua Z.写道：

> Tengine:  
> 6) More operations engineer friendly server information, so host can  
> [http://tengine.taobao.org/download/tengine-1.2.0.tar.gz](http://tengine.taobao.org/download/tengine-1.2.0.tar.gz)
> 
> Regards,
> 
> –  
> Joshua Z.  
> Senior Software Engineer  
> Server Platforms Team at Taobao
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

sounds great!thanks for hard working for open source.

i will try it later.

–  
Best regards,  
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED** )

Using Gmail? Please read this important notice:  
[Gmail — Free Software Foundation — Working together for free software](http://www.fsf.org/campaigns/jstrap/gmail?10073).

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 12:52pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/4 "2011-12-02T12:52:08Z")

</div>

Hey,

> Basically, Tengine can be considered as a better or superset of Nginx. You  
> can download the tar ball here:  
> [http://tengine.taobao.org/download/tengine-1.2.0.tar.gz](http://tengine.taobao.org/download/tengine-1.2.0.tar.gz)

No, you can’t 😛

The requested URL /download/tengine-1.2.0.tar.gz was not found on this  
server.

SVN checkout works though 😉

The one complain I have to make about your release is that you’re simply  
“dumping” lots of code without using version control system properly  
(one  
commit per change), which makes cherry-picking impossible and code  
review  
much less fun than it should be.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 1:27pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/5 "2011-12-02T13:27:00Z")

</div>

Hi Piotr,

On Fri, Dec 2, 2011 at 7:51 PM, Piotr S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> The requested URL /download/tengine-1.2.0.tar.gz was not found on this  
> server.

Thank you, the link is OK now.

> SVN checkout works though 😉
> 
> The one complain I have to make about your release is that you’re simply  
> “dumping” lots of code without using version control system properly (one  
> commit per change), which makes cherry-picking impossible and code review  
> much less fun than it should be.

Good point and I agree. We all post the changes to this maillist patch  
by  
patch. Thanks.

Regards,  
Joshua

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 1:17pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/6 "2011-12-02T13:17:41Z")

</div>

> This feature would impress me for sure. Right now I am glueing  
> javascript/css files using the PHP script, but I’d love to have internal  
> server-support for this. Also, features like 2) and 4) are very  
> interesting, too. I wonder what nginx authors think of this.

i’d like to see such feature in “original” nginx too.

Cheers,

Vladimir

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 1:35pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/7 "2011-12-02T13:35:05Z")

</div>

## great ~~

blog: [http://chenxiaoyu.org](http://chenxiaoyu.org)

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [December 2, 2011, 3:41pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459/8 "2011-12-02T15:41:30Z")

</div>

On 12/02/2011 12:02 PM, Joshua Z. wrote:

> Hi guys,
> 
> We’re glad to announce that Tengine ([http://tengine.taobao.org](http://tengine.taobao.org)), our  
> home-baked Nginx at Taobao now becomes an open source project.

Thanks for releasing this! I’ll probably play around with it over the  
weekend if I find the time.

> 1. 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.

This sound very interesting. The “documentation” link on the site  
doesn’t  
work so is there any description how to configure these new logging  
features available somewhere? I’m specifically interested in the remote  
syslogging and the log sampling which is useful for statistical analysis  
on  
high traffic web sites.

Regards,  
Dennis
