https://github.com/angular-rust/borderland
Application platform powers Loadbalancer, Microservices and API Gateways
https://github.com/angular-rust/borderland
api-gateway application-bus http-server microservice mio rust static
Last synced: 20 days ago
JSON representation
Application platform powers Loadbalancer, Microservices and API Gateways
- Host: GitHub
- URL: https://github.com/angular-rust/borderland
- Owner: angular-rust
- License: bsd-2-clause
- Created: 2018-06-01T16:07:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-09T21:59:44.000Z (over 7 years ago)
- Last Synced: 2025-04-05T04:32:01.310Z (12 months ago)
- Topics: api-gateway, application-bus, http-server, microservice, mio, rust, static
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# Borderland
[](https://travis-ci.org/ohyo-io/borderland)
[](LICENSE)
This project was started from ugly fun [example](ttps://github.com/PritiKumr/rust-httpd).
But this project is not a simple HTTP load balncer. We dont need it. We need to balance our application payload.
So let we use somthing like a application bus to communicate with application logic.
Also there standard practice to use external crates(modules,libraries).
But lot of them suffer from overprogramming, not clear implementation of specifications and unnecessary extra functionality.
So i liked the starter point of project and i would like to use less external code in that project.
Because "less code" is mean less errors and faster executon, which is main goal.
## Full Documentation
See the [**Borderland Project Wiki**](https://github.com/ohyo-io/borderland/wiki) for full documentation, examples, and operational details.
You may be looking for:
- [Release notes](https://github.com/ohyo-io/borderland/releases)
## How to run?
Make sure you have `cargo` [installed](https://www.rust-lang.org/en-US/install.html) and run the command `cargo run` to boot up the server.
Visit `locahost:8080` from your browser.
### What can it do now?
1. **Say hello world** - visit `localhost:8888/api/v1`
2. **Serve static files** - visit `localhost:8888/files/index.html` - this will serve the `index.html` file from the `www` folder in the repo root.
Place any other file inside `www` and they can be served similarly (using the `/files` prefix - this will be configurable by the user in future, just like in Apache and Nginx).
## Roadmap
- [x] HTTP Scheme redirect to HTTPS by design
- [x] Moved to MIO
- [ ] Routing
- [ ] Session handling
- [ ] Datastorage
- [ ] Application Bus
- [ ] Internal application logic
## Changelog
- Started profiling coz move to use MIO doesnt give good results
- HTTP to HTTPS redirect by design
- HTTPS part and threading
- Moved to MIO event based handling
- Detection plain HTTP by magic (similar as unix `file` command)
- Headers dump
- Small fixes to proper static content handling
## Benchmark
```bash
$ab -n 5000 -kc 500 http://127.0.0.1:8000/
...
Requests per second: 14109.94 [#/sec] (mean)
Time per request: 35.436 [ms] (mean)
Time per request: 0.071 [ms] (mean, across all concurrent requests)
```
It's sad (((
## Legal
### License
This work is licensed under the MIT license. See [LICENSE](./LICENSE) for details.