ws
Nginx
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ws
-
Setting up a WebSocket server in Node.js
Before setting up a WebSocket server in Node.js, we need to install the necessary dependencies. Fortunately, Node.js has a vibrant ecosystem with various WebSocket libraries available. In this article, we will focus on using the popular ws library, which provides a simple and efficient WebSocket implementation for Node.js.
-
8 Best WebSocket Libraries For Node
WS has a user base of 17.7 million people and over 20,000 forks. It also has clear and concise documentation, with examples and API references, to help developers understand how to integrate it into their projects.
-
WebSockets 101
In order to implement websockets, you can use a nodejs library named ws. It provides a fast and simple way to establish a websocket connection.
-
Is there anyway to auto reload the browser page when using express?
Next, you can use a library like chokidar to listen for changes in your source directory. Create a ws server, and whenever a file changes, send a message.
-
Is my health check endpoint good enough?
I use redis, sequelize and PG Listen/Notify via Robust Listeners with a websocket server coded in ws
-
7 Useful JavaScript Libraries To Build a Real-Time Web App
With over 19k stars on GitHub and about 60 million weekly downloads on npm, ws is one of the most popular open-source libraries for real-time web application development
-
Nest JS Websockets - Basics
Nest supports 2 websocket platforms - socket.io and ws. We're going to be using socket.io.
-
Render.com and Websocket: Connection randomly being closed after 5-ish minutes?
I'm trying out Render.com as a potential replacement for Heroku to host and run my code, which uses Node, Express, and the ws package to connect a game made on Godot Engine and the webapp, using a Websocket connection. However, when I migrated the code over, I've noticed that the game lasts barely a quarter of the way before the server aborts the Websocket connection for literally no reason. I'm serious, it's what the log says:
-
Quick introduction to WebSockets with Node.js
If you want to learn more about WebSockets, check out the official documentation.
-
5 enhancements that will boost your Node.js app
Making use of Web Sockets to improve server communication.
Nginx
-
How to securely reverse-proxy ASP.NET Core web apps
However, it's very unlikely that .NET developers will directly expose their Kestrel-based web apps to the internet. Typically, we use other popular web servers like Nginx, Traefik, and Caddy to act as a reverse-proxy in front of Kestrel for various reasons:
- Ask HN: Is nginx.org (the domain-name itself) gone?
-
Freenginx: Core Nginx Developer Announces Fork of Popular Web Server
> I actually don't understand why I am seeing arguments like this all the time.
Have a look at:
https://github.com/nginx/nginx/blob/master/src/http/modules/...
It's got the whole checklist: nginx idiosyncratic module system, inline parsing, custom utf conversion, buffer preallocation and adjustments, linked lists, comments about side effects of custom allocator, and probably other things.
It's not easy to deal with source like that and any serious improvement to that area would effectively be a rewrite anyway.
Since anything doing work in nginx is a module anyway, it wouldn't even have to be a full rewrite in one go.
-
The Internet is Maintained by 1 Software Developer
According to this article, nGinx is being used to serve 34% of all websites in the world. I checked out who's contributing to nGinx, and just like I thought, the project has 8,208 commits, and 5,366 of those commits was made by 2 software developers; igorsoev and mdounin.
- [06/52] Accessible Kubernetes with Terraform and DigitalOcean
- Freenginx.org
-
Performance benchmark of PHP runtimes
Nginx + Roadrunner (fcgi mode)
-
Web CGI programs aren't particularly slow these days
Apache’s mod_fastcgi’s last commit was 2 weeks ago:
https://svn.apache.org/viewvc/httpd/httpd/trunk/
It’s a fork of what you linked (and was more popular afaik back when fastcgi was state of the art, and apache was the undisputed champion of web servers).
These days, nginx has more market share than apache, and its fastcgi module is one of the more recently updated ones in its source tree (5 months vs multiple years):
https://github.com/nginx/nginx/tree/master/src/http/modules
If I was going to build an embedded web server, I’d start with nostd rust, probably with though axum + tokio, since thats already memory safe-ish.
If I needed fastcgi for some reason (dynamically loadable endpoints, or os-level isolation), there are at least four implementations of fastcgi for it. No idea if any are decent though.
-
Five Apache projects you probably didn't know about
APISIX is an API Gateway. It builds upon OpenResty, a Lua layer built on top of the famous nginx reverse-proxy. APISIX adds abstractions to the mix, e.g., Route, Service, Upstream, and offers a plugin-based architecture.
-
Nginx is Probably Fine
I suppose you could read the code. https://github.com/nginx/nginx
What are some alternatives?
fastify-websocket - basic websocket support for fastify
Caddy - Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
uWebSockets.js - μWebSockets for Node.js back-ends :metal:
envoy - Cloud-native high-performance edge/middle/service proxy
Socket.io - Realtime application framework (Node.JS server)
Squid - Squid Web Proxy Cache
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
nestjs-monorepo-microservices-proxy - Example of how to implement a Nestjs monorepo with no shared folder
graphql-ws - Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.
Hiawatha - Hiawatha is an open source webserver with security, easy to use and lightweight as the three key features. Hiawatha supports among others (Fast)CGI, IPv6, URL rewriting and reverse proxy. It has security features no other webserver has, like blocking SQL injections, XSS and CSRF attacks and exploit attempts. The built-in monitoring tool makes it perfect for large scale deployments.
Passport - Simple, unobtrusive authentication for Node.js.
YARP - A toolkit for developing high-performance HTTP reverse proxy applications.