Skip to main content

Command Palette

Search for a command to run...

Linux Web Servers: From Iterative to Epoll

Updated
1 min readView as Markdown
M

Hi 👋. I am Mohamed Abdelfatah and this is my Blog. I am an Outreachy intern with the Confidential Computing Consortium. In this Blog I write mostly about WebAssembly, WASI, Rust and my overall experience with Outreachy

When I fire up my code editor to create a web server that serves incoming requests, usually I don't care what-the-heck is going on underneath. Modern programming languages abstract away all the underneath details from you and give you a few functions in their standard library to create a decent web server in a few lines of code. The popular NodeJs framework, ExpressJs, actually makes it as simple as :

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

This is pretty amazing in terms of simplicity and productivity boosting. But, it is a bit annoying for me to just use a ready-made functions without knowing how my server is handling incoming requests, and