Sign inSign up

felipeagger/c-web-server

By felipeagger

•Updated almost 2 years ago

Image
0

324

felipeagger/c-web-server repository overview

⁠c-http-server-from-scratch

This is a implementation of Http server using directly Linux SystemCalls.

https://github.com/felipeagger/c-http-server-from-scratch⁠

There are some implementations:

  • simple-server.c: Using only accept syscall.
  • epoll-server.c: Using epoll syscall with 10 events.
  • io_uring.c: TODO.
⁠Default port is 8080.

⁠Endpoints:

  • GET /health-check: just return Healthy!
  • GET /api/io-bound: simulate io-bound with sleep
  • GET /api/cpu-bound: simulate cpu-bound with prime numbers

⁠Params QueryString

  • timeout: in ms (default is 10ms)

⁠Entrypoints:

  • /home/simple-server
  • /home/epoll-server

Tag summary

Content type

Image

Digest

sha256:5daa0a848…

Size

3.6 MB

Last updated

almost 2 years ago

docker pull felipeagger/c-web-server