rpg
rpg

Reputation: 1652

Perl - creating multiple HTTP servers listening on different ports

An external application will send HTTP POST request to multiple HTTP/HTTPS servers (e.g. 10 HTTP servers). These HTTP servers may get almost same HTTP Post request. These HTTP servers will analyze the data and send 200 OK response if data validation pass.

I am having all these HTTP servers listening on single host with different ports.

Please suggest me some way to achieve it.

FYI - This request response between Application and HTTP Server(s) will happen only once and then HTTP server will be closed.

I am thinking to implement it using forking the HTTP:Daemon 10 times but looking forward for some light solution.

Also I am thinking to capture these data through a single interface rather then checking the data from all 10 individual 10 HTTP server.

Upvotes: 2

Views: 482

Answers (1)

daxim
daxim

Reputation: 39158

for PORT in `seq 11111 11121` ; do plackup -Ilib --listen :$PORT app.psgi & done

Upvotes: 2

Related Questions