Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. lhttp

lhttp

MITGov1.1

A Go-based HTTP-like protocol over WebSocket for building scalable, customizable instant messaging servers.

GitHubGitHub
688 stars138 forks0 contributors

What is lhttp?

lhttp is a custom protocol built on top of WebSocket designed to simplify the creation of scalable instant messaging (IM) services without relying on XMPP. It provides a familiar HTTP-like structure for messages, enabling real-time, bidirectional communication with features like publish/subscribe and cluster support. It solves the problem of building performant, customizable IM systems with a simpler protocol than traditional options.

Target Audience

Developers and engineers building scalable instant messaging services, chat applications, or real-time notification systems who want to avoid the complexity of XMPP. It is also suitable for those needing a WebSocket-based protocol that integrates easily with existing HTTP services in languages like PHP, Java, and Python.

Value Proposition

Developers choose lhttp for its high performance, simplicity, and flexibility, offering a protocol that can publish 10,000 messages in 0.04 seconds on modest hardware. Its unique selling point is combining WebSocket real-time capabilities with an HTTP-like message structure and built-in cluster support, allowing for easy customization and horizontal scaling without the overhead of traditional IM protocols.

Overview

go websocket, a better way to buid your IM server

Use Cases

Best For

  • Building scalable instant messaging (IM) services or chat applications without using XMPP.
  • Creating real-time, bidirectional communication systems that require a simple, customizable protocol.
  • Implementing publish/subscribe messaging models with channel-based communication for notifications or updates.
  • Developing systems that need to integrate WebSocket-based real-time features with existing HTTP services in multiple languages.
  • Handling multipart data efficiently, such as file uploads, using byte offsets for performance.
  • Proxying or forwarding messages to external HTTP servers for processing, logging, or integration with upstream services.

Not Ideal For

  • Projects requiring industry-standard protocols like MQTT or XMPP for interoperability with existing systems.
  • Serverless or cloud-native applications where deploying a separate message broker (gnatsd) is not feasible.
  • Teams needing extensive, ready-to-use client SDKs in languages beyond JavaScript and C, such as Swift or .NET.
  • Applications prioritizing out-of-the-box solutions with minimal setup, like Firebase or pre-built chat services.

Pros & Cons

Pros

High Performance Messaging

The README states lhttp can publish 10,000 messages in 0.04 seconds on modest hardware (single-core CPU, 1GB memory), making it exceptionally fast for real-time applications.

Built-in Cluster Support

lhttp is designed to scale horizontally using a message center cluster (gnatsd), as shown in the architecture diagram, allowing multiple servers to handle load.

Seamless HTTP Integration

It works well with HTTP, enabling interoperability with languages like PHP, Java, and Python through standard HTTP POST requests for publishing messages, as demonstrated in the upstream feature.

Flexible Customization

Developers can define custom processors and commands, with everything being customizable, as illustrated in the usage examples where BaseProcessor is extended for chat functionality.

Cons

External gnatsd Dependency

Clustering requires running gnatsd as a separate message broker, adding deployment and management overhead beyond the core lhttp server.

Limited SDK Ecosystem

Only the JavaScript SDK is complete; the C SDK is marked as in progress, restricting client-side development in other languages without custom implementation.

Custom Protocol Complexity

lhttp uses a non-standard, HTTP-like protocol over WebSocket, which developers must learn and debug, increasing integration effort compared to raw WebSocket or established protocols.

Frequently Asked Questions

Quick Stats

Stars688
Forks138
Contributors0
Open Issues7
Last commit8 years ago
CreatedSince 2015

Tags

#chat#instant-messaging#publish-subscribe#websocket#golang#go#protocol#real-time#self-hosted#websockets#scalable

Built With

G
Go
D
Docker

Included in

Go169.1k
Auto-fetched 58 minutes ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,348
Forks1,815
Last commit2 hours ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,324
Forks1,841
Last commit3 days ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,403
Forks2,631
Last commit26 days ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars14,056
Forks1,262
Last commit12 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub