The OK Web Server
C++ C Python Makefile Logos M4 Other
Latest commit 10a2d35 Apr 19, 2016 @mmaxim mmaxim nvm!
Failed to load latest commit information.
build Accommodate perl in either usr/local or usr, for the benefit of new f… Jan 6, 2009
client tell the okssl::con_t that the jig is up Oct 14, 2014
conf clean hose Dec 12, 2011
contrib I think this fixes the coredumps in https clients when the caller tim… Oct 25, 2011
dist small tweak for gnu autotools Dec 17, 2005
docs test checkin Mar 20, 2007
examples clean hose Dec 12, 2011
ezdb clang-analyzer! May 27, 2014
htdocs clean hose Dec 12, 2011
libahttp Fix some forward compatibility issues.. Jan 18, 2016
libamongo amongo: manually closed connection stay closed and timeout only start… Mar 20, 2015
libamt clang-analyzer! May 27, 2014
libamt_pthread svn merge -r5765:5774 svn+ssh://… Sep 13, 2011
libamysql Fix a memory leak in mystmt Nov 26, 2014
libaok Add a new child mode, SSL_ORDINAL, which allows okd to be configured to Apr 12, 2016
libokssl tell the okssl::con_t that the jig is up Oct 14, 2014
libokxml Fix some forward compatibility issues.. Jan 18, 2016
libpub nvm! Apr 19, 2016
libredis rename to json_to_xdr Dec 11, 2015
librfn let clients of this function handle how severe of an error this case … Mar 28, 2016
libweb always cancel the abuf_t when it's time to stop chunking Oct 14, 2014
logd Made the conversions from str to char* explicit. Sep 19, 2013
m4 need empty file to get git to checkin empty dir, for mnahas Nov 8, 2011
notes svn merge -r5280:5301 svn+ssh://… Apr 30, 2010
okd not sure if this can ever happen, but just be safe Apr 12, 2016
pub reapply dict_cmp Sep 10, 2015
py Fixed pubast to work with python 2.6 and tagger installations Apr 8, 2015
ssld Add a new child mode, SSL_ORDINAL, which allows okd to be configured to Apr 12, 2016
test Fix regtest case 85: sort2 doesn't exist anymore Dec 2, 2015
tmp a failed attempt at a pipelined client (useful for testing) Jan 17, 2009
tools fix for python 2.6 Jun 9, 2014
xmlrpcc Fix some forward compatibility issues.. Jan 18, 2016
.gitignore Adding a new library to OKWS that enables support for connecting to and Oct 13, 2014
.gitmodules Now build okmongo in libamong using a git submodule Feb 4, 2015
AUTHORS more authors! Dec 12, 2011
COPYING license updates, etc. Nov 9, 2004
ChangeLog Initial revision Sep 25, 2003 add mongo interface via okmongo Feb 4, 2015 fix teh news Dec 12, 2011 Update Dec 22, 2015
acinclude.m4 merge 2411:2412 from devel/1.1 Dec 16, 2006
acokws.m4 setup.gnu: use SFS_ACLOCAL_PATH Jul 21, 2015
autoconf.sed svn merge -r5280:5301 svn+ssh://… Apr 30, 2010
cfg Switched cfg over to bash to enable using printf to handle quoting pr… Oct 12, 2012 nvm! Apr 19, 2016
setup.gnu setup.gnu: use SFS_ACLOCAL_PATH Jul 21, 2015

OKWS -- The OK Web Server

OKWS is a Web server, specialized for building fast and secure Web services. It provides Web developers with a small set of tools that has proved powerful enough to build complex systems with limited effort. Despite its emphasis on security, OKWS shows performance advantages relative to popular competitors. Commercial experience with OKWS suggests that the system can reduce hardware and system management costs, while providing security guarantees absent in current systems.

As of 8 Dec 2011, OKWS is still being maintained and worked on, with 3.1 being the active development version. There are no big feature-development plans on the horizon, but we're regularly committing bugfixes and extensions.


1 Dec 2011

  • Move everything over to GitHub for primary project hosting!

See our News file for a fuller list of updates.

A Better Architecture

The basic idea behind OKWS is that each Web service you write (such as ''search'' or ''newsletter-subscribe'') should run as a single process. There is no reason to sprinkle the same program across hundreds of address spaces just to get client concurrency. OKWS is built with this principle in mind. A Web service in OKWS is compiled into a free-standing process, calling upon our boilerplate libraries. Other standard helper processes run on the system, to direct traffic, to launch and relaunch applications should they crash, to log HTTP transactions to disk, and to access static HTML templates.

Programming in OKWS follows the single-threaded, event-driven model. No need to worry about the synchronization snafus that creep up when using multi-threaded or multi-process Web servers.

Who Runs OKWS?

Some example sites include:

Platform Support

OKWS runs on most Unixes, and has been tested extensively on FreeBSD and Linux.

Software Tools

Though OKWS is event-based at its core, A new tool, that is entirely compatible with existing libasync-based code, is [[sfslite::tame2]], which we urge you to read more about. It's a simple C++-level rewriter that makes your event code look more like threaded coded. I.e., you can make a sequence of serial blocking functions within one function body.


OKWS is freely available under a GPL v2 license.

Academic Publications

  • Building Secure High-Performance Web Services With OKWS. Maxwell Krohn, in Proceedings of the 2004 USENIX Annual Technical Conference USENIX 2004, Boston, MA, June 2004. [ ps | ps.gz | pdf ].

  • Events Can Make Sense. Max Krohn, Eddie Kohler and M. Frans Kaashoek, in Proceedings of the 2007 USENIX Annual Technical Conference USENIX 2007, Santa Clara, CA, June 2007. [ ps | ps.gz | pdf ].

Our GitHub Wiki Documentation Center

Active People

  • Mike Maxim
  • David Koh
  • Tom Jacques
  • Till Varoquaux

Patch Contributors

  • Ben Hollenstein
  • Ian Rickard (Apple Darwin Patches)
  • Michael Walfish (various patches and fixes for API problems).
  • Benjie Chen
  • OkCupid team, including Tom Quisel, Mike Maxim, Tom Jacques, and Eli Gwynn.