Build scalable servers with forking or event-driven patterns. HTTP, SMTP, Telnet, Syslog, DHCP, and custom protocols.
A framework designed for real-world server applications
Event-driven mode solves the c10k problem with libevent, handling thousands of simultaneous connections efficiently.
Choose between forking (safer, isolated) or event-driven (faster, more concurrent) patterns based on your needs.
Built-in handlers for HTTP, SMTP, Telnet, Syslog, DHCP, JSON-RPC, XML-RPC, and SOAP protocols.
Extend with custom handlers. The architecture separates concerns between core socket handling and protocol logic.
Built-in cryptographic stream support for secure connections with minimal configuration.
Utilities for daemonizing your server processes, with PID file management and memory controls.
Pre-built handlers for common network protocols
Full HTTP/1.1 server with request parsing and response handling
Mail server protocol for receiving and processing emails
Interactive terminal connections with line-based input
Centralized logging server for network devices
Dynamic host configuration protocol server
JSON-RPC, XML-RPC, and SOAP for web services
Real-world performance metrics using Apache Benchmark
⚠️ Watch for thundering herd problem
✓ Solves the c10k problem
Simple installation and quick start guide
git clone https://github.com/animeshkundu/flake.git
<?php
require_once 'flake.php';
class MyHandler extends \Flake\Handler {
public function Handle_Read($data) {
$this->Write("Hello from Flake!\n");
}
}
$core = new \Flake\Core();
$core->Listen('tcp://0.0.0.0:8080', 'MyHandler');
$core->Run();
php server.php
Clean, modular design for extensibility
Start creating high-performance network applications with Flake today.