Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-21 Thread Sergey Didenko
I see, thanks. On Tue, Jan 21, 2014 at 4:17 PM, Xfeep Zhang wrote: > > On Tuesday, January 21, 2014 6:25:02 AM UTC+8, Sergey Didenko wrote: >> >> Hi Xfeep, >> >> What are the good ways to handle some heavy Clojure calculations when >> using nginx-clojure? >> > > Do you mean every request will c

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-21 Thread Xfeep Zhang
On Tuesday, January 21, 2014 6:25:02 AM UTC+8, Sergey Didenko wrote: > > Hi Xfeep, > > What are the good ways to handle some heavy Clojure calculations when > using nginx-clojure? > Do you mean every request will cost too much time ? If time cost is mainly caused by IO blocking, java thread p

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-20 Thread Sergey Didenko
Hi Xfeep, What are the good ways to handle some heavy Clojure calculations when using nginx-clojure? Under nginx model it's bad to block other incoming requests by holding a working thread for too long, right? So is it better to route complex job to http-kit? Or to use some kind of queue? Or may

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-15 Thread Xfeep Zhang
On Wednesday, January 15, 2014 12:39:57 PM UTC+8, Roberto De Ioris wrote: > > > i strongly suggest you to avoid the "performance" as a selling point, your > project is cool but not for performance (and you are using a pipe to > transfer requests data from nginx to the jvm so there ipc in place

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-15 Thread Xfeep Zhang
On Wednesday, January 15, 2014 12:39:57 PM UTC+8, Roberto De Ioris wrote: > > > > Hi Mingli, > > > > Thanks for your suggestion. > > > > Nginx-Clojure is quite different from uwsgi when supports JVM. > > > > Nginx-Clojure make JVM embed into Nginx worker process. JVM and Nginx > > worker ha

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Roberto De Ioris
> Hi Mingli, > > Thanks for your suggestion. > > Nginx-Clojure is quite different from uwsgi when supports JVM. > > Nginx-Clojure make JVM embed into Nginx worker process. JVM and Nginx > worker have the same memory process space. > > Nginx-Clojure heavy uses pointer operation just like C to ha

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Xfeep Zhang
I have check the uwsgi document again and the JVM integration document is HERE http://uwsgi-docs.readthedocs.org/en/latest/JWSGI.html . When using uwsgi to integrate JVM, the JVM process is not the same process of Nginx worker. So it can

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Xfeep Zhang
Hi Mingli, Thanks for your suggestion. Nginx-Clojure is quite different from uwsgi when supports JVM. Nginx-Clojure make JVM embed into Nginx worker process. JVM and Nginx worker have the same memory process space. Nginx-Clojure heavy uses pointer operation just like C to handle memory wi

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Mingli Yuan
Hi, Xfeep, Thanks for your contribution, and the project looks interesting. For me, the idea of driving ring webapp behind nginx is not new. We use uwsgi to drive our ring app behind nginx in our production. uwsgi support JVM and ring for almost one year, and I think the code is relative stable r

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Xfeep Zhang
You are welcome! Yes, you are right. One JVM instance is embed per Nginx Worker process. The number of Nginx Workers is generally the same with the number of CPU. If one Worker crashs the Nginx Master will create a new one so you don't worry about JVM crashs accidentally. Although there w

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Feng Shen
Hi, Thanks for your work on nginx-clojure. It looks great! As I know Nginx spawns many processes(correct me if I am wrong), does that mean, there will be many JVM process? On Tuesday, January 14, 2014 4:44:18 PM UTC+8, Xfeep Zhang wrote: > > > I have done the first one. The result is >

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Xfeep Zhang
I have done the first one. The result is HERE( https://github.com/ptaoussanis/clojure-web-server-benchmarks ) Thanks Taoussanis for his invitation to the project clojure-web-server-benchmarks

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-13 Thread Xfeep Zhang
You're welcome. I think there are several difficult phases : (1) update the test program in clojure-web-server-benchmarks, make the some packages to be the latest. (eg. http-kit from 1.3.0-alpha2 --> 2.1.16) and add nginx-php testi

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-13 Thread Sergey Didenko
Looks very interesting, thank you for your work! I wonder how this is going to improve latency in comparison to nginx + http-kit for some real world test that is not using heavy DB operations. On Mon, Jan 13, 2014 at 5:57 AM, Xfeep Zhang wrote: > > So far I have found why nginx-clojure is slow

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-12 Thread Xfeep Zhang
So far I have found why nginx-clojure is slower than http-kit when 1 concurrents. (when < = 1000 concurrents nginx-clojure is faster than http-kit.) I have set too many connections per nginx worker (worker_connections = 2) . This make nginx only use one worker to handle ab requests (ev

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-12 Thread Xfeep Zhang
Sorry for my mistake! 1. In the static file test, the ring-jetty result is about 10 concurrents. NOT 1 concurrents ("Concurrency Level: 10" in the ab report ). 2. In the small string test, All results about three server are about 10 concurrents. NOT 1 concurrents. There are right

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-12 Thread Xfeep Zhang
Sorry for my mistake! 1. In the static file test, the result is about 10 concurrents. NOT 1 concurrents ("Concurrency Level: 10" in the ab report ). 2. In the small string test, All results about three server are about 10 concurrents. NOT 1 concurrents. There are right results a

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-10 Thread Xfeep Zhang
Thank you! I think it's useful. I have done some simple tests. But I think general performance test may be meaningless regardless of real world requirements. os : ubuntu 13.10 64bit memory: 16G cpu: intel i7 4700MQ (4 cores 2.4GHz) 1. static file test file: 29.7k (real contents from https://

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-09 Thread Julien
Impressive! Did you run some benchmark? How does it compare to ring-jetty and http-kit? Julien Le jeudi 9 janvier 2014 12:42:31 UTC-3, Xfeep Zhang a écrit : > > [image: Alt > text]Nginx-Clojure > > is a Nginx modu