Show HN: Concurrently Logging HTTP Requests
1–10 of 12 posts
Re: Show HN: Concurrently Logging HTTP Requests
#2Re: Show HN: Concurrently Logging HTTP Requests
#3Re: Show HN: Concurrently Logging HTTP Requests
#4This is cool! I wonder how it looks for really busy servers (hundreds or thousands of req/sec).
I wrote this mainly for the need of better debugging in development, and never inspected live traffic on a production server.
If you balance your application across servers/workers and keep the log on a per-worker basis I think there shouldn't be a problem in doing so.
Otherwise - you could make a middleware that collects requests that require attention (response time above some threshold, non-200 status codes, errors).
Then you could "replay" the logger on those requests.
(You can't do it live, since you can't know in advance which requests will be of interest.)
Maybe I find a way to incorporate this into the project, so that you can use it out of the box :-)
Re: Show HN: Concurrently Logging HTTP Requests
#5Re: Show HN: Concurrently Logging HTTP Requests
#6https://en.wikipedia.org/wiki/Interval_arithmetic (2+2)-free posets, ascent sequences and pattern avoiding permutations https://arxiv.org/abs/0806.0666
Re: Show HN: Concurrently Logging HTTP Requests
#7beautiful ASCII visualization! In theory class we called it "interval arithmetic" https://en.wikipedia.org/wiki/Interval_arithmetic (2+2)-free posets, ascent sequences and pattern avoiding permutations https://arxiv.org/abs/0806.0666
The coloring depending on response time happens in intervals, that much I can say.
Re: Show HN: Concurrently Logging HTTP Requests
#8beautiful ASCII visualization! In theory class we called it "interval arithmetic" https://en.wikipedia.org/wiki/Interval_arithmetic (2+2)-free posets, ascent sequences and pattern avoiding permutations https://arxiv.org/abs/0806.0666
Sorry, I couldn't quite follow - could you break it down in simple sentences what the connection between those links you provided and the visualization is? The coloring depending on response time happens in intervals, that much I can say.
#1 |--------------------|
#2 |---------------| |---------|
#3 |------------| |---|
#4 |----| |------| |--|
#5 |---------------------|
Each of these channels have overlapping event. Some sessions happen strictly before the other. Sometimes, one logs on before the other one logs of. Etc. The more channels we have the more complex behavior. That is all the paper is saying.Sorry about that.
Re: Show HN: Concurrently Logging HTTP Requests
#9Earlier quoted context omitted.
Sorry, I couldn't quite follow - could you break it down in simple sentences what the connection between those links you provided and the visualization is? The coloring depending on response time happens in intervals, that much I can say.
I am not saying anything very deep. We can try to count all the different ways 5 (or 100) people can have sessions on a website #1 |--------------------| #2 |---------------| |---------| #3 |------------| |---| #4 |----| |------| |--| #5 |---------------------| Each of these channels have overlapping event. Some sessions happen strictly before the other. Sometimes, one logs on before the other one logs of. Etc. The m…
Assuming I am looking at your sketch with the x-axis being time, I just want to note that specific to this library there won't be two events (request start, end or log) at the same time. (The "concurrency" here comes from coroutines, not parallel threads)
Re: Show HN: Concurrently Logging HTTP Requests
#10Earlier quoted context omitted.
I am not saying anything very deep. We can try to count all the different ways 5 (or 100) people can have sessions on a website #1 |--------------------| #2 |---------------| |---------| #3 |------------| |---| #4 |----| |------| |--| #5 |---------------------| Each of these channels have overlapping event. Some sessions happen strictly before the other. Sometimes, one logs on before the other one logs of. Etc. The m…
Thanks for making that example! Assuming I am looking at your sketch with the x-axis being time, I just want to note that specific to this library there won't be two events (request start, end or log) at the same time. (The "concurrency" here comes from coroutines, not parallel threads)
#1 |------|
#2 |--------|
and #2 happens before #1 #1 |-------|
#2 |---------|
or #1 starts then #2 starts: #1 |-------------|
#2 |------------|
or #1 starts before #2 and finishes before #2 #1 |---------------------|
#2 |----------|
For two channels are are 8 possibilities in all. https://oeis.org/A079144