# amphp/http-server

An advanced async HTTP server library for PHP, perfect for real-time apps and APIs with high concurrency demands.

Repository: https://github.com/amphp/http-server
Canonical: https://ross.abutalabs.com/products/amphp-http-server
Homepage: https://amphp.org/http-server
Language: PHP
License: MIT
License Family: permissive
Topics: php, application-server, http, async, http-server, revolt
Last push: 2026-06-27T10:37:10+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 90, longevity 100
- inputs: {"age_days": 4964, "days_push": 67, "days_rel": 67, "gap_med": 10, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1325, forks 103 (observed 2026-08-28T04:04:22.472822+00:00)

## What it is
amphp/http-server is a non-blocking, concurrent HTTP/1.1 and HTTP/2 application server library for PHP built on the Revolt event loop and Amp fibers. It supports TLS, middleware, routing, static file serving, sessions, and WebSockets via companion packages.

## Use cases
- build a high-concurrency async HTTP API server in PHP
- serve real-time apps with WebSockets in PHP
- run a non-blocking HTTP/2 server with TLS
- handle many concurrent I/O-bound requests without blocking
- build a chat bot or real-time backend on an event loop
- serve static files alongside dynamic routes in PHP

## When to choose
- your PHP app is I/O-bound and needs high concurrency
- you want fiber-based async code instead of promise chains
- you need WebSockets or long-lived connections in PHP
- you want an application server without nginx/php-fpm request-per-process overhead

## When to avoid
- your app relies heavily on blocking PHP built-in I/O functions
- you need a simple CRUD site better served by a traditional framework
- your team is unfamiliar with async/concurrency concepts
- you need CGI-style hosting on shared PHP environments

## Facets
- artifact type: library
- maturity: stable
- function: http-server, websocket, routing, middleware, static-site-generator
- domain: web-development, backend, apis
- platform: php, cli, cross-platform
- tags: async, event-driven, non-blocking, revolt, fibers, http2, tls, composer, amphp, real-time

## Member repositories
- amphp/http-server (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.472822+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:46:33.236909+00:00, confidence not recorded.
  - readme: https://github.com/amphp/http-server (fetched 2026-08-28T04:04:22.472822+00:00, sha 0595e3a0a9c3)
  - homepage: https://amphp.org/http-server (fetched 2026-08-29T12:05:27.299997+00:00, sha 5b328bf506fb)
  - site_page: https://amphp.org/installation (fetched 2026-08-29T12:05:27.310059+00:00, sha 41a9417c174e)
  - site_page: https://amphp.org/faq (fetched 2026-08-29T12:05:27.312162+00:00, sha 180e2ae49605)
- Data as of 2026-08-30T08:39:29.467469+00:00.
