net-eval multi thread

Q&A's, tips, howto's
Locked
dexter
Posts: 74
Joined: Fri Nov 11, 2011 12:55 am

net-eval multi thread

Post by dexter »

I have a little program
need to to send net-eval to the main process
time by time

But I found out that, the main process is a single thread for doing net-eval

so It will frozed ,if too many net-eval requests sent to the main process

Will newlisp have a multi thread for doing this job or never will be ?


Thanks

iNPRwANG
Posts: 32
Joined: Sun May 08, 2011 1:45 pm

Re: net-eval multi thread

Post by iNPRwANG »

My solution is use a http server which has the reverse proxy feature, such as Nginx.

First, start multipile newLisp instance as local http servers, let them listening for http request.
Second, configure the Nignx as a reverse proxy, it can hold the http request from user, and dispatch the request to each newLisp instance, the Nginx may use "load balancing" to process the request.

The code of Nginx config file in http segment like this:

Code: Select all

	upstream localhost {
		server	localhost:4242;
		server	localhost:4243;
	}

Locked