All Projects → esastack → Esa Restlight

esastack / Esa Restlight

Licence: apache-2.0
ESA Restlight is a lightweight and rest-oriented web framework.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Esa Restlight

esa-httpclient
An asynchronous event-driven HTTP client based on netty.
Stars: ✭ 82 (+22.39%)
Mutual labels:  asynchronous, netty, https, http2, filter, haproxy, interceptor
Nuster
A high performance HTTP proxy cache server and RESTful NoSQL cache server based on HAProxy
Stars: ✭ 1,825 (+2623.88%)
Mutual labels:  http2, haproxy, https
Katwebx
An extremely fast static web server and reverse proxy for the modern web.
Stars: ✭ 39 (-41.79%)
Mutual labels:  lightweight, http2, https
Haproxy
HAProxy Load Balancer's development branch (mirror of git.haproxy.org)
Stars: ✭ 2,463 (+3576.12%)
Mutual labels:  http2, haproxy, https
HAProxy-2-RPM-builder
Build latest HAProxy binary with prometheus metrics support
Stars: ✭ 28 (-58.21%)
Mutual labels:  https, http2, haproxy
Fast Android Networking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Stars: ✭ 5,346 (+7879.1%)
Mutual labels:  http2, https
Servicetalk
A networking framework that evolves with your application
Stars: ✭ 656 (+879.1%)
Mutual labels:  http2, netty
Gun
HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP.
Stars: ✭ 710 (+959.7%)
Mutual labels:  http2, https
Farwest
Framework for building RESTful HATEOAS-driven applications.
Stars: ✭ 18 (-73.13%)
Mutual labels:  http2, https
Embassy
Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux
Stars: ✭ 440 (+556.72%)
Mutual labels:  asynchronous, lightweight
Symfony Docker
A Docker-based installer and runtime for Symfony. Install: download and `docker-compose up`.
Stars: ✭ 732 (+992.54%)
Mutual labels:  http2, https
Vue Loadable
⏳ Improve your loading state control with pretty simple methods and helpers.
Stars: ✭ 23 (-65.67%)
Mutual labels:  asynchronous, interceptor
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+776.12%)
Mutual labels:  http2, https
Asyncro
⛵️ Beautiful Array utilities for ESnext async/await ~
Stars: ✭ 487 (+626.87%)
Mutual labels:  asynchronous, filter
Reservoir
Android library to easily serialize and cache your objects to disk using key/value pairs.
Stars: ✭ 674 (+905.97%)
Mutual labels:  asynchronous, serialization
Elle
The Elle coroutine-based asynchronous C++ development framework.
Stars: ✭ 459 (+585.07%)
Mutual labels:  asynchronous, serialization
Cowboy
Small, fast, modern HTTP server for Erlang/OTP.
Stars: ✭ 6,533 (+9650.75%)
Mutual labels:  http2, https
Shgf
Simple HTTP golang framework
Stars: ✭ 13 (-80.6%)
Mutual labels:  http2, https
Golang Tls
Simple Golang HTTPS/TLS Examples
Stars: ✭ 857 (+1179.1%)
Mutual labels:  http2, https
Netty Websocket Spring Boot Starter
🚀 lightweight high-performance WebSocket framework ( 轻量级、高性能的WebSocket框架)
Stars: ✭ 885 (+1220.9%)
Mutual labels:  asynchronous, netty

Restlight

Build codecov Maven Central GitHub license

Restlight is a lightweight and rest-oriented web framework.

Features

  • HTTP1.1/HTTP2/H2C/HTTPS support
  • SpringMVC and JAX-RS annotations support
  • High performance: 2 to 4 times Spring Web
  • Fully asynchronous: Based on CompletableFuture
  • Threading Model: Connector thread, IO thread, Biz thread
  • Thread Scheduling: Schedule requests to IO thread pool, Biz thread pool, or any custom thread pool
  • Self-Protection: Connection creation limit, CPU load overload protection
  • Spring Boot Actuator support
  • Extension: Use SPI(enhanced) to extend Restlight
  • Layered architecture: Use Restlight in Spring Boot, Spring, and embedded environment without compatibility issues
  • more...

Quick Start

Create a Spring Boot application and add dependency

<dependency>
    <groupId>io.esastack</groupId>
    <artifactId>restlight-starter</artifactId>
    <version>${mvn.version}</version>
</dependency>

Write your Controller

@RestController
@SpringBootApplication
public class RestlightDemoApplication {

    @GetMapping("/hello")
    public String hello() {
        return "Hello Restlight!";
    }

    public static void main(String[] args) {
        SpringApplication.run(RestlightDemoApplication.class, args);
    }
}

Run your application and then you would see something like

Started Restlight server in 1265 millis on 0.0.0.0:8080

curl http://localhost:8080/hello

Performance

Test cases

  • We built an echo server by ESA Restlight and used a http client to do the requests for RPS testing with different bytes of payload(16B, 128B, 512B, 1KB, 4KB, 10KB) and different Threading-Models(IO, BIZ).
  • Also we used spring-boot-starter-web(2.3.2.RELEASE) to build a server which is same with above for RPS testing.

Hardware Used

We used the following software for the testing:

  • wrk4.1.0

  • OS CPU Mem(G)
    server centos:6.9-1.2.5(docker) 4 8
    client centos:7.6-1.3.0(docker) 16 3

JVM Options

-server -Xms3072m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:logs/gc-${appName}-%t.log -XX:NumberOfGCLogFiles=20 -XX:GCLogFileSize=480M -XX:+UseGCLogFileRotation -XX:HeapDumpPath=.

Server Options

Framework Options
Restlight restlight.server.io-threads=8
restlight.server.core-biz-threads=16
restlight.server.max-biz-threads=16
restlight.server.blocking-queue-length=512
Spring Web server.tomcat.threads.max=32
server.tomcat.accept-count=128

RPS

16B 128B 512B 1KB 4KB 10KB
Restlight(IO) 129457.26 125344.89 125206.74 116963.24 85749.45 49034.57
Restlight(BIZ) 101385.44 98786.62 97622.33 96504.81 68235.2 46460.79
Spring Web 35648.27 38294.94 37940.3 37497.58 32098.65 22074.94

See more details in Reference Doc

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].