Last Updated: February 25, 2016
·
578
· revskill

A proxy in Node.js

In our university, there is an ASP.NET application using SQL Server. Due to the architecture (not sharding and horizontally scaled), when the concurrent processing threshold litmits, the CPU gets 100% and the server hang. This is a proxy built on the http-proxy and redis to allow the current concurrent users to use system.

https://github.com/checkraiser/crazyproxy/blob/master/proxy.js

This proxy used the order set structure from redis to remove expired clients and expires all clients in a time.