About Using ElasticSearch WebServer?


(Sang Dang) #1

Hi All,

Currently, I have my own webserver (using embeed jetty )

My webserver listen and support jsonp to return search request.

In my webserver, I use java api to connect to elastic search & return json
value.

Today, I have a stress test and I see that Jetty will go hang when connect
go to 1500-2000 connection per second although the ES still ok.

I stress test ES and it is alright.

I think the main difference is jetty vs netty.

So I want to building from source and using ES exist http handler. Is it
good ?

Or I just change my jetty to netty & get searching result from java api ?

Thanks.

P/S: I need 2000 request / second (4M record)

I could have 3 server ( 24 core, 32 Gb Ram).

--


(simonw-2) #2

I think it's reasonable to try & do!
simon

On Friday, October 12, 2012 3:46:00 PM UTC+2, kidkid wrote:

Hi All,

Currently, I have my own webserver (using embeed jetty )

My webserver listen and support jsonp to return search request.

In my webserver, I use java api to connect to elastic search & return json
value.

Today, I have a stress test and I see that Jetty will go hang when connect
go to 1500-2000 connection per second although the ES still ok.

I stress test ES and it is alright.

I think the main difference is jetty vs netty.

So I want to building from source and using ES exist http handler. Is it
good ?

Or I just change my jetty to netty & get searching result from java api ?

Thanks.

P/S: I need 2000 request / second (4M record)

I could have 3 server ( 24 core, 32 Gb Ram).

--


(Sang Dang) #3

Hi Simmonw,

What do you mean for reasonable to try & do ?
Jetty ?

Or Netty inside ES ?

I just recheck and found that the last problem maybe because the jetty
couldn't spawn new native thread.

Last time, I put ES & my webserver into same server ( 32 Gb Ram + 24 core).

In my case, I expect to handle 2k request per second. Each request, I would
wait for response from ES ( avg 100 ms) So I think my thread need to have
is:

2000*(100 + 20)/1000 = 240 threads.

So in jetty server I need to set minimum threads to 250 and maximum threads
to 300. Is it ok ?

I would try to inherit the NettyHttpRequest in ES to handle my request for
testing purpose.

I just wonder which is best in my case.
+ #1: Using Jetty to process business logic of ajax query
+ #2: Extend NettyHttpRequest in ES to handle request & business
logic.

Thanks.

On Friday, October 12, 2012 10:45:04 PM UTC+7, simonw wrote:

I think it's reasonable to try & do!
simon

On Friday, October 12, 2012 3:46:00 PM UTC+2, kidkid wrote:

Hi All,

Currently, I have my own webserver (using embeed jetty )

My webserver listen and support jsonp to return search request.

In my webserver, I use java api to connect to elastic search & return
json value.

Today, I have a stress test and I see that Jetty will go hang when
connect go to 1500-2000 connection per second although the ES still ok.

I stress test ES and it is alright.

I think the main difference is jetty vs netty.

So I want to building from source and using ES exist http handler. Is it
good ?

Or I just change my jetty to netty & get searching result from java api ?

Thanks.

P/S: I need 2000 request / second (4M record)

I could have 3 server ( 24 core, 32 Gb Ram).

--


(system) #4