Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Do something with every second polling #673

Closed
Kagami opened this issue Feb 27, 2014 · 8 comments
Closed

Do something with every second polling #673

Kagami opened this issue Feb 27, 2014 · 8 comments

Comments

@Kagami
Copy link

Kagami commented Feb 27, 2014

At first I would like to thank you for the great software. I'm really enjoy using it.

But some thing really scary me:
For some reason I opened the web-console while using the Graylog web interface and it's really surprised me what I saw there: https://f.cloud.github.com/assets/533383/2279772/9a6523b2-9f78-11e3-89a1-4896b07d7e8f.png

It naturally sends AJAX request every second. Why don't you use WebSockets (available in every modern browser, even IE) or long polling at worst?

The same behaviour appears if I log in (it starts polling /a/system/throughput instead). And on the streams page even worse: AJAX request for every stream every second. What if I have hundred streams? And the same for the widgets. I already have 8 widgets so it's 9 seconds per second for just single web page.

I would love to see this fixed. Thanks.

I'm using the latest graylog2-server (0.20.1) and latest graylog2-web (0.20.1). Tested with Google Chrome 33.0.1750.117.

@lennartkoopmann
Copy link
Contributor

We are not planning to migrate away from the AJAX requests for now (and WebSockets are not supported in IE9 which we need to support) but there certainly is space to improve and group some together into single calls. Keeping this ticket open for that.

@Kagami
Copy link
Author

Kagami commented Feb 28, 2014

For IE9 Flash or long polling fallback could be used. There are plenty of libraries which provide this transparently: web-socket-js, socket.io for example.

@lennartkoopmann
Copy link
Contributor

That's true - You are right that this would be technically possible.

It would however require changing everything there from polling to a pubsub approach - And we don't see the technical necessity to invest too much time into that right now. It might be nicer to have, but so far we did not see any performance problems with a polling approach - Even in setups with billions of messages.

@Kagami
Copy link
Author

Kagami commented Feb 28, 2014

I do not care about perfomance issues on the server-side since I'm using personal setup of the graylog and only a few people have access to it.
But I do care about client-side: though for now with 8 widgets I can't recognize noticeable browser slowness but I will definetely do with 50-100 widgets. And think about the mobiles and people with slow Internet connections: they just cannot use interface which makes tons of requests per second.
So at least compromise solution by using single AJAX-request for updating all widgets at once would be nice thing to have.

Btw, why are AJAX requests sent every second when I have widgets cached for 10 seconds (default)? Is it a bug or feature?

@lennartkoopmann
Copy link
Contributor

Yes, we already started consolidating the node throughput calls per input into one AJAX call and not multiple calls for every single input.

@kroepke kroepke modified the milestone: gemini Jun 3, 2014
@kroepke kroepke added this to the 0.21 milestone Jul 3, 2014
@dennisoelkers
Copy link
Contributor

Duplicate of #779

@dennisoelkers dennisoelkers modified the milestones: 0.90.1, 0.92 Oct 13, 2014
@joschi joschi modified the milestone: 0.92 Jan 13, 2015
@kroepke kroepke self-assigned this Apr 16, 2015
@kroepke kroepke added this to the 1.1.0 milestone Apr 16, 2015
@kroepke
Copy link
Contributor

kroepke commented Apr 16, 2015

This issue has been partly addressed by #1214 #1182 and #779 (see comment there)

The widgets are still polling but we will address that in a future version.

@kroepke kroepke removed their assignment Apr 16, 2015
@kroepke kroepke removed this from the 1.1.0 milestone Apr 16, 2015
kroepke added a commit that referenced this issue May 22, 2015
in case your reverse proxy does not support websockets and sockjs is not able to detect that it isn't, there's the option to turn it off via a system property:

 -Dwebsockets.enabled=false

 issues #673
 fixes #1322
 Graylog2/documentation#18
@bernd
Copy link
Contributor

bernd commented Aug 11, 2015

Closing this because we are working on fixing this.

@bernd bernd closed this as completed Aug 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants