HNHacker News
TopNewBestAskShowJobs

gttalbot

222 karma · joined August 11, 2019

submissionscomments
gttalbot··on Twitter has fired more software engineers
It does mention it. 4 weeks severance. The people who decided not to sign up for "hardcore Twitter" got 3 months.
gttalbot··on CPSC calls for full recall of all Onewheel self-balancing electric skateboards
Honestly if the CPSC existed when motorcycles were invented, they might not exist. I gotta go with the Onewheel people on this one.
gttalbot··on Moral Toddlers Making a Mess
Bull. Blame some fringe group for everything while at the same time blowing off the billions spent on global warming denialism since the 1980s.
gttalbot··on New York could become first state with a ‘Right to Repair’ law
This is great. There's no technical reason why iPhone, Android phones, tablets, etc., have batteries that are glued in and not easily swappable.
gttalbot··on ‘Return to the office’ rhetoric needs to end
The office model that the likes of Google et. al. have is also a means of doing age discrimination on the sly. These offices are in places that it's vastly difficult for cost and other reasons to have a family, so folks that get to that stage in their lives end up leaving or finding some way to do distance based arbitrage. Remote work short circuits that so of course they don't like it.
gttalbot··on Byte Magazine: The Forth Language (1980)
Forth aside, take a minute to browse the magazine and look at all the ads. So many companies from so many different cities.
gttalbot··on ‘The War on Music’ Review: Songs Without Listeners
See Frank Zappa's autobiography for an excellent discussion of this very thing.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
The system design choice was to make data visible to queries as soon as possible after being pushed to Monarch, to satisfy alerting guarantees.

Thus there was no queue like a pubsub or Kafka in front of Monarch.

At scale this required a "smoothness of flow". What I mean by this is that at the scale the system was operating the extent and shape of the latency long tail began to matter. If there are many many many many thousands of RPCs flowing through servers in the intermediate routing layers, any pauses at that layer or at the leaf layer below that extended even a few seconds could cause queueing problems at the routing layer that could impact flows to leaf instances that were not delayed. This would impact quality of collection.

Even something as simple as updating a range map table at the routing layer had to be done carefully to avoid contention during the update so as to not disturb the flow, which in practice could mean updating two copies of the data structure in a manner analogous to a blue green deployment.

At the leaf backends this required decoupling--to make eventual--many ancillary data structure updates for data structures that were consulted in the ingest path, and to eventually get to the point where queries and ingest shared no locks.

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Yeah I hope OpenTelemetry works out as well.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Yeah that's a tough one, and it was indeed a luxury to be able to have a uniform instrumentation library.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
What? Planet scale? Well. You can literally issue a query that fans out to every continent on Earth, and returns the result right to your dashboard. Not exaggerating. ;^) (OK maybe not Antarctica but I'm not sure...)
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Yeah in theory people could do their own custom bucketing functions. Would be worth researching log-linear for that certainly.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
And yeah, everyone used the same instrumentation library, which could be used in a lot of different contexts, sometimes surprising!
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
It was more that they would rather send Monarch an RPC than be connected to. Not everyone wants e.g. an HTTP server in their process. For example maybe they are security sensitive, or have a limited memory envelope, or other reasons.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
If you can put these into the metrics system as metrics themselves, then join against them, that works. (IIRC handling all the various things that could be happening in a data center like drains, planned & unplanned downtime, etc., it's more complex than a simple join.)
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Yeah it was a tough tradeoff for the default case, because the team didn't want to use too much memory in everyone's binary since the RPC metrics were on by default. This is easily changeable by the user if necessary, though.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
The key trade off if low-dependency, with everything up to and including alert notification delivery pushed down to the region. For alerting queries to happen there is little infrastructure Monarch depends upon to keep running beyond networking and being scheduled on the machines.

If you think about Bigtable, a key observation that the Monarch team made very early on is that, if you can support good materialized views (implemented as periodic standing queries) written back to the memtable, and the memtable can hold the whole data set needed to drive alerting, this can work even if much of Google's infrastructure is having problems. It also allows Monarch to monitor systems like Bigtable, Colossus, etc., as it doesn't use them as serving dependencies for alerting or recent dashboard data.

It's a question of optimizing for graceful degradation in the presence of failure of the infrastructure around the monitoring system. The times the system will experience its heaviest and most unpredictable load will be when everyone's trying to figure out why their service isn't working.

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Also, I gave this talk a couple of years ago, though I'm not sure how deeply I talked about collection models.

https://youtu.be/2mw12B7W7RI

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
See my comment below, on the challenges of pull based collection on Monarch. There were many. I can answer questions, if that's helpful.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Also, very large ad-hoc queries are supported, with really good user isolation, so that (in general) users don't harm each other.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Monarch can support both ad-hoc and periodic, standing queries of arbitrarily large size, and has the means to spread the computation out over many intermediate mixer and leaf nodes. It does query push-down so that the "expensive" parts of aggregations, joins, etc., can be done in massively parallel fashion at the leaf level.

It scales so well that many aggregations are set up and computed for every service across the whole company (CPU, memory usage, error rates, etc.). For basic monitoring you can run a new service in production and go and look at a basic dashboard for it without doing anything else to set up monitoring.

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
This means each new query over a certain size becomes a federation problem, so the friction for trying new things becomes very high above the scale of a single instance.

Monitoring as a service has a lot of advantages.

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
This. Any new large query or aggregation in the Borgmon/Prometheus model requires re-solving federation, and continuing maintenance of runtime configuration. That might technically be scalable in that you could do it but you have to maintain it, and pay the labor cost. It's not practical over a certain size or system complexity. It's also friction. You can only do the queries you can afford to set up.

That's why Google spent all that money to build Monarch. At the end of the day Monarch is vastly cheaper in person time and resources than manually-configured Borgmon/Prometheus. And there is much less friction in trying new queries, etc.

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Pull collection eventually became a real scaling bottleneck for Monarch.

The way the "pull" collection worked was that there was an external process-discovery mechanism, which the leaf used to connect to the entities it was monitoring, the leaf backend processes would connect to the monitored entities to an endpoint that the collection library would listen on, and those entities collection libraries would stream the metric measurements according to the schedules that the leaves sent.

Several problems.

First, the leaf-side data structures and TCP connections become very expensive. If that leaf process is connecting to many many many thousands of monitored entities, TCP buffers aren't free, keep-alives aren't free, and a host of other data structures. Eventually this became an...interesting...fraction of the CPU and RAM on these leaf processes.

Second, this implies a service discovery mechanism so that the leaves can find the entities to monitor. This was a combination of code in Monarch and an external discovery service. This was a constant source of headaches an outages, as the appearance and disappearance of entities is really spiky and unpredictable. Any burp in operation of the discovery service could cause a monitoring outage as well. Relatedly, the technical "powers that be" decided that the particular discovery service, of which Monarch was the largest user, wasn't really something that was suitable for the infrastructure at scale. This decision was made largely independently of Monarch, but required Monarch to move off.

Third, Monarch does replication, up to three ways. In the pull-based system, it wasn't possible to guarantee that the measurement that each replica sees is the same measurement with the same microsecond timestamp. This was a huge data quality issue that made the distributed queries much harder to make correct and performant. Also, the clients had to pay both in persistent TCP connections on their side and in RAM, state machines, etc., for this replication as a connection would be made from each backend leaf processes holding a replica for a given client.

Fourth, persistent TCP connections and load balancers don't really play well together.

Fifth, not everyone wants to accept incoming connections in their binary.

Sixth, if the leaf process doesn't need to know the collection policies for all the clients, those policies don't have to be distributed and updated to all of them. At scale this matters for both machine resources and reliability. This can be made a separate service, pushed to the "edge", etc.

Switching from a persistent connection to the clients pushing measurements in distinct RPCs as they were recorded eventually solved all of these problems. It was a very intricate transition that took a long time. A lot of people worked very hard on this, and should be very proud of their work. I hope some of them jump in to the discussion! (At very least they'll add things I missed/didn't remember... ;^)

gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Correct. Spanner is used to hold configuration state, but is not in the serving path.
gttalbot··on Monarch: Google’s Planet-Scale In-Memory Time Series Database
Yes. This. Also, displaying histograms in heatmap format can allow you to intuit the behavior of layered distributed systems, caches, etc. Relatedly, exemplars allowed tying related data to histogram buckets. For example, RPC traces could be tied to the latency bucket & time at which they complete, giving a natural means to tie metrics monitoring and tracing, so you can "go to the trace with the problem". This is described in the paper as well.
gttalbot··on The 1936-1937 Purge of Soviet Astronomers (1991)
Paywalled
gttalbot··on You don't need an EV to cut your carbon emissions from oil
No, you don't, but my Mustang Mach E is really fun to drive. That's one of the great sort-of secrets of EV's
gttalbot··on 20 year study of global wealth demolishes the myth of ‘trickle-down’
Well, duh. If you can't even fund enforcement for investigating wealthy tax cheats, not only is there a wealth transfer from everyone else to the wealthy via unbalanced tax burdens, it's also an indication of how deeply captured by wealthy interests out government truly is.
gttalbot··on Has the lead-crime hypothesis been debunked?
Well, we're not "post-lead" anyway. Particularly in larger, older cities there is a lot of lead paint around, and this tends to be clustered in older, poorer neighborhoods with unrenovated and more poorly maintained dwellings. I'm not sure this is a good meta analysis.
← PreviousPage 2 of 3Next →