When I use event streaming and observe events I receive, I found events does not always arrive "realtime", usually the last message doesn't show up until the next batch of events.
I use wireshark to capture the traffic and found that marathon did send out events in real time, but requests just keeping holding the last message.
Then I did a little research and found that reqeusts.Response.iter_lines does not work in a realtime manner, using the default chunk_size.
See the issues under requests:
psf/requests#3577 (comment)
When I use event streaming and observe events I receive, I found events does not always arrive "realtime", usually the last message doesn't show up until the next batch of events.
I use wireshark to capture the traffic and found that marathon did send out events in real time, but requests just keeping holding the last message.
Then I did a little research and found that
reqeusts.Response.iter_linesdoes not work in a realtime manner, using the defaultchunk_size.See the issues under requests:
psf/requests#3577 (comment)