Home

Awesome

LEAR - Linux Engine for Asset Retrieval

Build Status

Description

LEAR is a simple HTTP server designed to be as simple and fast as possible to achieve one task: serve static resources with amazing efficiency. Currently the project is in its early stage, but is gaining momentum and features.

Architecture

While being small and lightweight, LEAR is as concurrent and non-blocking as possible. It also uses state-of-the-art technologies and solutions to achieve its task: serve your assets rapidly. It features:

Features

Installation

Customization

httpd.yaml offers you all the options currently available - there are no console switches. I believe that at this moment these settings are self-explanatory. We'll do full configs rewrite soon, config documentation is planned to appear afterwards.

FAQ

Why is LEAR faster than nginx/apache...

Because LEAR is small and simple. LEAR does one task - serve static pages - and does it well. It also implements only a small subset of the HTTP, which makes it incomplete in the sense of being standard-compilant, but also very fast in the sense of real life use.

You said it's fast but actually it's slow on big files

LEAR caching support is WIP. When it's ready, we hope it'll outperform most common HTTP engines

Why is X unsupported?

Because LEAR started in October 2018 - so it's quite a young project isn't it? If you like C, please help us in development by accomplishing some task from the Github Issues page. If you prefer not to

Should I use it in my production environment?

No. In its current status, LEAR is extremely incomplete, even for simplest deployments. Its security has also not yet been checked by any means. Please, keep us in mind and return in few months - we're sure LEAR will be your next production server then.

Benchmark

As development is in early stage, this benchmark is just a performance profiling tool for me, and maybe significant information for people who like this project. It will be updated recently when any performance-related changes happen. Logging is currently disabled in LEAR while benchmarking. Also, please, do not believe these benchmarks. It's just the result of some code run on my laptop, running default, non-tuned nginx, you know. If you have any results to share, please, submit a PR to this readme!

ApacheBench 2.3 results

MethodKeep-alive?File size [B]Number of requestsConcurrency levelLEAR master [rps]NGINX 1.5.15 [rps]
GETYes865100000010098885.1262859.55
GETYes8651000000127786.0521591.06
GETYes222930610000100760.801821.60
GETYes2229306100001781.601508.20

TODO

If you like this project, feel free to contribute, fork and send PRs! Current, non-finished list of feature requests is available on Github Issues page. Remember to keep straight KISS rule - LEAR is never going to be RFC-complete as it's designed just to serve GET responses as fast as possible.

Please, open an issue if you find any bugs or consider any feature that fits the spirit of this project.

License

LEAR is distributed for free as a source code, under the permissive MIT license.