Developer Tools25k+ stars

NGINX

High-performance HTTP server and reverse proxy

Commit Details

Message
"Initial revision"
Author
Igor Sysoev
Date
2004-10-04
Hash
e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1e1

Fun Fact

Igor Sysoev created NGINX to solve the C10K problem - handling 10,000+ concurrent connections. It now powers about 30% of all websites.

</>First Code

C
/*
 * Copyright (C) Igor Sysoev
 */

#include <ngx_config.h>
#include <ngx_core.h>

int
main(int argc, char *const *argv)
{
    ngx_log_t  *log;
    ngx_cycle_t  *cycle;
    
    log = ngx_log_init();
    
    cycle = ngx_init_cycle(log);
    if (cycle == NULL) {
        return 1;
    }
    
    // The C10K solution: event-driven, non-blocking I/O
    ngx_master_process_cycle(cycle);
    
    return 0;
}