Monkey v1.5.2 is out

Short news, a new fix release have arrived, the changes are the following:

  • Signal: restore handler for SIGPIPE
  • HTTP: on using API sendfile, check EAGAIN
  • HTTP: If-Modified-Since now allow clients from the future
  • Mimetype: add SVG types (fix #153)
  • Help: add missing break line on text

For more details please refer to the official announcement page:

The Monkey Software company (LLC)

I am proud to inform that Monkey Software LLC have been formed, the purpose of this company is to provide Enterprise/Commercial support around Monkey and Duda products plus the development of specific of Cloud & Embedded solutions.

This is really good news as we will provide professional services for real, this is just the beginning so many good things will happen during this year, the company site is, we are still in a early stage but moving forward.

This announcement do not change anything on how the development of Monkey and Duda have been done in the last years, the only difference would be the intention to invest more resources on it. Monkey and Duda continue being Open Source projects under the Apache License v2.0.

This is the required step to make the projects to scale, as well provide strong solutions for real business problems.

Monkey joined Yocto Proyect

I am pleased to announce that Monkey Project (HTTP Server and Duda I/O) have joined as an official participant to Yocto Project:

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture. It was founded in 2010 as a collaboration among many hardware manufacturers, open-source operating systems vendors, and electronics companies to bring some order to the chaos of embedded Linux development.

Yocto Project is fully focused on Embedded Linux and of course is backed by the Linux Foundation. We joined many other organizations and companies that participate as well such as: Intel, LG, Broadcom, AMD, Huawei, Gumstix, Texas Instruments, Freescale and many more.

All this, is a big step forward for our organization, also reconfirm our compromise to work in a unified platform for Embedded systems
where our primary goal is to contribute with the Linux ecosystem and push forward optimized and scalable web backend technology:

Monkey v1.5 (Emperor Tamarin) is out!

Emperor Tamarin

After a three months-cycle of development Monkey v1.5 with codename Emperor Tamarin is finally out!. This release is very exciting from different perspective: features, performance, Embedded Linux, community and legal.

Monkey have a strong focus on Embedded Linux, but it also have it on High-End production servers, for hence the development roadmap and non-technical areas to cover are have been growing in the last time, more hands are always welcome!

What is exciting on Monkey Project starting from now ?, very good things... in the Legal side, starting from now, Monkey HTTP Server and Duda I/O are under the terms of the Apache License v2.0. We strongly believe in Open Source and also be Open to closed environments is critical in the real world. Monkey components are business friendly, there is no need to be aware of License restrictions, and after a small debate and hours of thinking we concluded that Apache License v2.0 represents better how we will interact from now with future adopters, note that this is not just a HTTP server, is a complete Development Stack so there are many things to have in consideration.

On every technical thing, Documentation is a critical add-on of the code. Weeks ago we started a new Documentation Project to keep full information about every feature and setup available for all new Monkey releases, you can see the results on the available documentation for Monkey v1.5.

Kudos to the developers of GitBook project as they built the right tool that helps to focus just on one thing: write documentation. It uses Markdown format and is fully integrated with Github. Monkey documentation is build and rendered using GitBook.

Embedded Linux

As said, Embedded Linux is always one of our targets, if you hear about an HTTP Server or web services stack optimized for Embedded Linux.. it's Monkey.

Raspberry Pi

Since a few months we provide stable packages of Monkey for Raspbian, no changes on this direction, we provide long term support and bug fixes for Monkey in Raspberry Pi devices.

Did you know that through Google Summer of Code 2014 program one of our students is developing a Dashboard based on Monkey/Duda for the Raspberry Pi ?. More news shortly :)

Yocto Project

In order to provide a stable channel of Monkey stack for Yocto Project, we have started a new project called Monkey-Yocto, which aims to deliver official recipes for Yocto developers wanting to use Monkey as their HTTP stack.

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture. It was founded in 2010 as a collaboration among many hardware manufacturers, open-source operating systems vendors, and electronics companies to bring some order to the chaos of embedded Linux development.

Scheduler: Kernel Balancing

Starting from Linux Kernel 3.9, there is a new TCP/UDP socket option which allows to bind same port and address from multiples threads called SO_REUSEPORT. This is a recent Linux Kernel feature that can be used by servers wanting to improve performance reducing the bottleneck on the accept(2) system call.

Monkey v1.5 will detect the running Kernel and if the version is matched (>= 3.9), each working thread will create it own listener. So the Linux Kernel will perform connections balancing providing a better Scheduling on SMP systems that requires to scale.

If the detected Kernel is lower than 3.9, it will use the old Fair Balancing mechanism.

SSL Cache

In order to improve performance when using SSL, the PolarSSL plugin now uses a session cache mechanism, reducing the number of required memory allocations for internal structures that may case some overhead when facing high loads.

Other changes

Here is a list of other changes for the Monkey version in question:

  • Virtual Host: built-in support for configurable HTTP redirection.
  • Core: event handler fix when removing closed connection (FastCGI fix).
  • Auth: rewrite of mk_passwd Python tool in C
  • Core: new interfaces to tweak features based on Kernel version.
  • SystemD: new init service file.
  • Memory: memory allocator Jemalloc upgraded to v3.6
  • Pooling: fix missing close events on socket (EPOLLRDHUP)
  • Pooling: new HANGUP mode
  • Cheetah!: add support for Kernel features being used

Thanks to everyone that was involved on this process!, more details on the official announcement page:

Moving to Apache License v2.0

One of the most relevant changes for Monkey HTTP Server and Duda I/O projects, is the terms under which the code is being distributed. As of few days ago, both projects were distributed under the GNU Lesser General Public License v2.1 and after months of thinking, evaluating different options and hearing feedback from our community members, I have decided that the best choice is the Apache License v2.0

Why ?

In a few words, this change is a response to a major concern expressed by several individuals and companies evaluating our technology for different needs: GPL is not business friendly.

You may have your opinion about GPL and LGPL and how they can be merged to work in a closed source environment, but this is a blocker, I want to see Monkey and Duda become widely adopted by companies and the License should not be an issue.

Also, our technology is not just a simple HTTP Server, it's a complete infrastructure components to build scalable web services optimized to work on common Linux systems and Embedded Linux.

Open Source matters!, but I am also confident that we must be Open to work in a real-world environment where closed source software also exists.

GSoC 2014 results

finally April 21 is here and Google have released the selection process results. First of all in name of our community, thanks for trust in Monkey Project, this is our third time in the program and every time is an exciting opportunity for all of us. In a yearly basis the selection process have been improved and as we expected we got high quality proposals, but as you know we just got five slots, for hence the selection process involved many areas to chose the right students.

This time we got 23 proposals, 4 of them were marked as "ignore", 2 were withdrawn last minute by students, 5 were accepted and the remaining were rejected.

Selected Students

  • Savita Seetaraman, Advanced Caching plugin for Monkey server

  • Vladimir Cernov, Monkey shared library with python bindings

  • Zeying Xie, Co-routines support for Duda I/O

  • Domen Ipavec, Raspberry Pi Dashboard

  • Nithin Saji, Lua Scripting (and possible Memcache plugin)

Now the fun begins, we will be sharing more details in the incoming weeks, stay tuned!

GSoC 2014: Students Applications

this year we received in total 23 student applications for the different Project Ideas, most of them have a good quality and others still need to improve for the next time. This is a graph that represents when students applied:

the application period was opened on March 10th and was closed on March 22th. Some students started work on their proposals before March 10, and we can see that happened because after our initial feedback by email and talk through IRC, they submitted their official applications on Google Melange between March 12th and March 14th.

The second point (a bit frustrating) is that the new peak arrived on the last day, few hours before the real deadline, and this happened to many Organizations, despite how busy a student can be, this is something to improve, everything can be managed with enough time.

Now the mentors team is working reviewing the Student proposals and final results will be published by Google on April 21th. Almost one month from now, the suggestion for our students is: stay around, continue contributing and relax, just keep up the good work :)

Google Summer of Code 2014

Today Google announced the organizations that will take part of Google Summer of Code 2014 (GSoC) and we are proud to say that Monkey Project have joined the program on it's third consecutive year. If you are not familiar with what GSoC is, take one minute to review the F.A.Q that answer every possible question about the program.

This is awesome news, as year over year our organization grows and the commitement with the open source community get even stronger. We continue our mission to make a better (open) server side technology, we will continue pushing the performance limits and improving where is possible.

We invite all students around the world to review our Project Ideas page and join us in our mission, if you share our same motivation do not hesitate ton contact us. For more details about how to apply to Monkey Project through GSoC2014, please refer to the following page:

Monkey v1.4 : Spider Monkey is out!

after four months of work i am pleased to announce that Monkey HTTP Server v1.4 with code name Spider Monkey have been released.

For short description changes please refer to the following announcement page:

This version brings interesting core changes that aim to improve general performance and a better development experience. Let's describe some niet features.

Shared File Descriptors

This is a great general improvement in the server, basically the idea is that when facing requests for the same resource under a Virtual Host context be able to share the same opened file descriptor.

A simple example would be: imaging that you are getting 500 concurrent requests over the same static file (mapped under the same VirtualHost), instead of perform 500 open(2) system calls, just share the file descriptor. This is a huge gain because you were able to reduce the number of file descriptors required by the server, be a small device or a big server this is a real improvement.

The technical implementation is through a HashTable (HT) per VirtualHost, the HT can hold up to 64 entries and each one up to 8 chains in case of collissions, that give us the chance to store a maximum of 512 shared file descriptors.

When a file is going to be opened, the VirtualHost routines checks if the file is already open, if so, just use the same File Descriptor (FD) and increase a counter that represents the readers. When some connection instruct to release the FD, the VirtualHost routine checks if is a shared FD or not, if it is, just decrement the readers counter and if it reach zero, perform an explicit close(2). If its not shared, just close it directly.

This feature is enabled by default but can be disabled any time through monkey.conf configuration file under the key FDT, e.g:

    FDT  Off

Linux Trace Toolkit (LTTng)

The Linux Trace Toolkit (LTTng) is an excellent tracing tool for the Linux Kernel and it also provides a user-space version.

This version of Monkey implements LTTng to perform on-demand traces over the Scheduler en Pooling interfaces, of course this is an optional feature for debugging and development purposes and is not something to be used in a production environment.

To enable Monkey + LTTng a new configure script argument called --linux-trace have been added:

$ ./configure --linux-trace

Jemalloc Memory Allocator

the common GLibC memory allocator is not well suited to be used when running servers, because of memory fragmentation, scalability problems on multi core system and others.

After analyzing different open options, i found that Jemalloc solve many of GlibC problems and is widely used in the Servers world:

The good thing is that also Jemalloc provides a statistic interface so it's possible to track memory used per thread scope thanks to it's Arena's design.

From now Jemalloc is the default memory allocator that is compiled statically into Monkey, so the compiling time will take much longer than previous versions.

As Monkey tried to be flexible, this change is the default one but also it's optional, you can back to the default system memory allocator configuring Monkey with the option --malloc-libc:

$ ./configure --malloc-libc

Proxy Reverse Plugin (experimental)

thanks to the work done by Nikola Nikov on the past Google Summer of Code program, we have an experimental Proxy Reverse plugin. This is really good news so we expect to make this plugin in a stable stable (and default) on the incoming v1.5.

To enable this plugin when compiling from sources the following options are required:

$ ./configure --enable-plugins=proxy_reverse

Secure Socket Layers (PolarSSL 1.3)

Sonny Karlsson have improved the PolarSSL plugin so it nows support also newer versions of PolarSSL Library 1.3.x.

There is no specific requirements to make this work as on compile time the Plugin will use the right API depending of the installed version.

License: LGPL v2.1

From now all Monkey Core and Plugins distributed as part of the sources have been moved to LGPLv2.1.

We are still evaluating a possible change to a more flexible License.


Collaboration matters and have the right tools helps to decrease the entry level difficulty. Also as Monkey and Duda I/O are a complete HTTP development stack, many people depends of our GIT repositories to build their development and deployment environment, so for stability and speed we moved all our repositories to Github:

From now all collaboration with Monkey Project related software will be done through Github channels: issue tracker, pull requests, comments, etc.

Our Trac instances have been migrated to Github too, so the address and redirects to the project Issues pages on Github.

Blog: from Wordpress to Ghost

as you can see you are reading this in a new Blogging system: Ghost. Wordpress is difficult to maintain and to write, as Ghost said "Wordpress is not longer for Blogging" and we agree.

The good thing about Ghost is that all posts are written in Markdown format, so its easy to write and easy to deploy.

What's next ?

a lot!, we are working to join Google Summer of Code again this year so if you have any ideas to propose or want to become an Organization Mentor (in case we are accepted), feel free to join us.

We started the development phase of Monkey v1.5 and the main focus for this next round is to have an improved testing infrastructure and of course keep moving forward on improving performance.

On the Duda I/O side we have reach the point where we need to start maintaining stable branches as a couple of companies are running their services based on Duda, so API stability is a must and we must do it right from the beginning.

As usual you can reach us on Freenode #Monkey channel or through our mailing lists. Also you can follow us on Twitter.

Monkey just turned 6! Happy Birthday !!!

Monkey Project was started on 2001, just for fun and to learn... but on January 21th 2008 it started a new era, it was rewritten to work in event-driven mode, new plugins interface and many performance improvements, it got a serious project. what we have now is far different from what it was on the beginning.

And the family grows... we have extended from a HTTP server to a complete development stack with Duda I/O, things are moving forward very quickly and serious business already started to trust in Monkey technology for their needs.

In the next few days Monkey v1.4 will see the light with many handy features, as usual exciting times are coming and we have more incoming surprises for the next week, stay tuned!

Now its time to celebrate, cheers!