lua-resty-limit-traffic
haproxy_ddos_protector
lua-resty-limit-traffic | haproxy_ddos_protector | |
---|---|---|
1 | 1 | |
805 | 18 | |
0.9% | - | |
5.4 | 10.0 | |
6 months ago | almost 3 years ago | |
Lua | Lua | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lua-resty-limit-traffic
-
Ask HN: What's a good open-source alternative to Cloudflare?
Openresty with a few Nginx modules and Lua scripts can go a long way for many use-cases mentioned:
- ModSecurity for WAF: https://github.com/SpiderLabs/ModSecurity
- L7 Rate limiting: https://github.com/openresty/lua-resty-limit-traffic
- Cache: https://github.com/ledgetech/ledge . Or use varnish which gives you VCL for high configurability
- CDN: https://github.com/taythebot/lightpath . This project seems to be a WIP which you can use as a starting point for your needs. You will also need to find good enough "edge" locations for your CDN.
Similarly, HAProxy does a lot of stuff with the correct config and is also extensible using Lua:
haproxy_ddos_protector
-
Ask HN: What's a good open-source alternative to Cloudflare?
- L7 DDoS protection: https://github.com/mora9715/haproxy_ddos_protector
You can run your own authoritative DNS server using either djbdns or nsd. Or use AWS Route 53.
Ultimately, it will involve (a lot of) glue code/config depending on what solution you go ahead with. Building your own DDOS protection and CDN can be operationally expensive as you may need to negotiate good rates with your ISP/VPS/Cloud for network bandwidth. It will also involve devops bandwidth in building for both low latency and availability. It will also involve keeping in sync with security fixes and the state of the art in terms of bot protection, etc. If this use case is not a core part of your business, it will be better to bite the bullet and go ahead with a 3rd party solution like Cloudflare / Cloudfront + WAF / Google Cloud Armor / Fastly
What are some alternatives?
ledge - An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
lightpath - CDN written in Lua using Openresty and Redis
ModSecurity - ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
torrent - Full-featured BitTorrent client package and utilities
workerd - The JavaScript / Wasm runtime that powers Cloudflare Workers