palantir is a HTTP REST API reverse proxy. It will perform load balance, caching, and health check. Also, it will prevent DDOS and will report metrics concerning health status of backend servers.
Important: palantir is still under development and is not ready.
If you are using Linux or macOS, you need to install Rust using rustup:
curl https://sh.rustup.rs -sSf | sh
For installation on Windows, read the instructions in rust-lang book.
git clone firstname.lastname@example.org:AASAAM/palantir.git
After modifying config.toml based on your upstream server:
cd palantir cargo run --release --features fast
palantir is built in Rust, so it can be compiled to native code for your architecture. Rust, unlike some languages such as Golang, does not have a garbage collector (GC) which constantly looks for no longer used memory while the program runs. Therefore, GC is usually a bad thing for high-throughput / high-load production systems. "In Rust, memory is handled through a system of ownership with a set of rules that the compiler checks at compile time. None of the ownership features slow down your program as it is running" (reference).
In early benchmarks, we observed that palantir competes with the nginx reverse proxy.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
"But alone it could do nothing but see small images of things far off and days remote."
the Lord of the Rings, The Two Towers by John R. R. Tolkien
The proxy's name palantír is derived from the Lord of the Rings, which is an artefact "used for both communication and as a means of seeing events in other parts of the world or in the distant past or in the future" (reference).
This name has been chosen because:
Reverse proxies are communication tools similar to seeing-stones. They could do nothing alone, but can be used to converse.
They may show something from the past (i.e., cached data).
They where designed to guard and unite humans' world, by obtaining information. This reverse proxy tries also to collect metrics and prevent DDOS in collaboration with other microservices.
Palantíri (plural of palantír), may mislead you since the health status of the message is not guaranteed per se. Much work is required for revealing the real health status of the upstream servers, which is going to be developed in health module.