Fast. Non-Blocking. Type-Safe.

Suave is a lightweight, high-performance web server written in F#. Async from the ground up with modern optimizations for production workloads.

Why Suave?

High Performance

65-75% fewer allocations per request with modern .NET optimizations. Built for throughput and low latency.

🔒

Type-Safe

Leverage F#'s powerful type system. Catch errors at compile time. Domain modeling with discriminated unions and records.

⚙️

Async Native

Completely non-blocking I/O throughout. Native async/await with task computation expressions. Scales to thousands of concurrent connections.

🔧

Easy to Use

Simple, composable API. Build REST APIs, WebSockets, and microservices with minimal code. No magic, just pure F#.

📦

Production Ready

HTTPS/TLS support, keep-alive connections, HTTP compression, rate limiting, and comprehensive logging built-in.

🌍

Cross-Platform

Runs on Linux, macOS, and Windows. .NET 8+ support. Deploy as executable or container.

Hello World - 30 Seconds

The simplest Suave application:

open Suave
open Suave.Successful

let app = OK "Hello, Suave!"

startWebServer defaultConfig app

That's it! Your web server is running on http://localhost:8080.

→ Read the getting started guide

Performance Optimizations

Suave has undergone comprehensive performance optimization using modern .NET best practices:

📉

65-75% Fewer Allocations

ArrayPool integration, encoder caching, Span<T> parsing, and pre-computed constants eliminate GC pressure.

🚀

40-70% Higher Throughput

Optimized hot paths with ref-to-mutable conversions and zero-allocation integer formatting.

⏱️

35-55% Lower P99 Latency

Reduced GC pauses through systematic allocation elimination. Smooth, predictable performance under load.

→ See detailed performance analysis

What Can You Build?

  • REST APIs - Fast, type-safe REST backends
  • Microservices - Lightweight services with minimal overhead
  • Real-time Apps - WebSocket support for live features
  • GraphQL Servers - Built on top of Suave's composition model
  • Static File Server - Efficient static content delivery
  • Embedded Web Servers - Add web capabilities to any F# application

Installation

Add Suave to your F# project via NuGet:

dotnet add package Suave

Or add to paket.dependencies:

nuget Suave

→ Get started with your first project

Ready to build something fast?