Webserver Load Testing: A first exposure

TL;DR:

A minimal webserver achieved less than 5k concurrent requests / second, much below expectations. The reason: the logging configuration was invisibly consuming cycles.

Context

Last night I stumbled upon this post which outlined a performance issue related to JVM webservers. The post you're reading contributes nothing, it just serves …

more ...

Hyperfixate

My sister: "You need a hyperfixation interest. I think everyone needs one, actually. You need a deep dive rabbit hole."

  1. Bird Watching
  2. Beekeeping
  3. Grilling
  4. Smoking (meats)
  5. Ted Cruz
  6. Gun collecting
  7. High-end Audio
  8. Home Brew Smart Home
  9. Coffee Roasting
  10. Chocolate Making
  11. Learn to recognize different species of cockroaches, so when someone …
more ...

Centralia, PA

On my drive across PA I visited the mythic Centralia. You can read up on the modern ghost town in any number of places. So here I'll share my photos and feelings of the place.

Centralia is an unassuming grid of overgrown streets tucked between the Pennsylvania hills. When I …

more ...

Gzipping UUIDs

UUIDs are generally uncompressable. This is because their values can be anything and multiple UUIDs generaly don't repeat in a payload. So you may be surprised to learn that a JSON list of UUIDs compresses to 56% of their original size. Here's an example:

[
  "572585559c5c4278b6947144d010dad3",
  "b97ec0750f67468d964519e18000ccf6",
  "c1c69970b9bc4c0a9266a3350a9b2ab1",
  "2eb10805db484db7a196f89882d32142",
  "4b3569aaac154195aaa5ea114eff6566",
  "e253f04c1f414b7291e682ea465e8e19 …
more ...

The Pittsburgh List

A life full of activity is a fulfilling one. So the saying doesn't go. I made it up. And now that I have a car in the City of Steel I can fill my days with activities beyond food festivals and coffee shops. Here is a list of adventures now …

more ...

Debugging concurrent requests, for simple cases

This is a simple strategy for confirming that some values are shared between requests. There must be a more 'correct' way to inspect values in concurrent requests, but I was unable to find it. I normally use a debugger to set breakpoints, but there was no way to set a …

more ...

Chaco Canyon

I'm writing this post several months from when I visited Chaco Canyon. I visited Chaco Canyon in the first week of February on my drive up from Albuquerque to Monitcello. This was a beautiful drive.

I was listening to Brave New World as I passed valley and mountain. It just …

more ...

Prolog Exercise: A Min and Max predicate in CLPFD

Yesterday I implemented a predicate to compute the min and max of a list. Today I'm doing the same, but now with constraints.

The code looks pretty much the same thanks to the handy min and max constraints.

:- use_module(library(clpfd)).

min_and_max([V], A, B) :-
    V #= A, V #= B.
min_and_max …
more ...

Prolog exercise: Min and Max of a list

As a fun exercise I implemented a predicate to calculate the minimum and maximum element of a list.

min_and_max([A], A, A).
min_and_max([H|R], N, X):-
    min_and_max(R, RN, RX),
    N is min(H, RN),
    X is max(H, RX).

Next I wrote a version with last-call optimization.

min_and_max_2 …
more ...

One thing I miss from Mercury

It's been a year since I've written any Mercury (the purely logic/functional programming language), but there's one feature I miss. It's nothing fancy, and certainly one of the less interesting features Mercury has to offer.

The Problem

To understand this particular feature let's look at where other languages fail …

more ...