Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
SplitDuck.com Use A/B testing to increase revenue
22

Scaling Go to 192 Cores with Heavy I/O

from Jaz's Blog [alt+shift+b] in AI

For the past few months I’ve been working alongside Why, Jacob, Dan, and Divy on a new revision of Bluesky’s global AppView. The AppView is a piece of infrastructure that aggregates posts, likes, follows, etc. from all across ATProto and merges them into a consistent view of the network, allowing users to fetch their timelines, notifications, custom feeds, etc. This component requires an ability to scale horizontally with the amount of relevant records on the network. At time of writing, there are around 730,000,000 different records across three million users of the main PDS instances operated by Bluesky. The first version of the AppView was a proof-of-concept Typescript service that sat in front of a large PostgreSQL instance and queried it on demand to satisfy requests from users. This worked up to a point but eventually we had to spin up lots of DB replicas to query more frequently. Additionally our write throughput was capped to the vertical limits of a single DB instance. To allow AppViewV2 to scale horizontally, we needed to build on top of a horizontally scalable database and have a better thought-out data layer between the AppView frontend API and the DB. The V2 Dataplane We chose to build the V2 Dataplane as a Go service on top of ScyllaDB and Redis. We have a Scylla cluster running on our own hardware in a datacenter, along with a number of dense compute nodes for backend services. Our Dataplane service runs on systems with 2x96 Core AMD Genoa-X CPUs with > 1GB of L3 Cache, 512GB of RAM, and as much on-board NVME storage as we need. This Go service runs a ConnectRPC server and is a lightweight wrapper around ScyllaDB queries utilizing Go’s concurrency runtime and Scylla’s custom, shard-aware GoCQL driver. During replayed real-world loads, our Dataplane service makes ~15.2 Scylla queries per request served, acting as a low latency fanout service for the Typescript frontend API. Limits of Concurrency in Go Go’s concurrency runtime scales very well in cloud...
10th Jan 2024

Stay updated

Get a weekly newsletter with the top 5 articles worth reading every week.

More from Jaz's Blog

Reverse Twins
2nd Oct 2025 • 24 votes
Turning Billions of Strings into Integers Every Second Without Collisions

I’ve recently started building a POC of a Redis RESP3 Wire Compatible Key/Value Database built on FoundationDB with @calabro.io and though it’s rather early, it’s already spawned a fun distributed systems problem that I thought would be interesting to share. Previously I’ve written about how I implemented a Graph DB via Roaring Bitmaps, representing relations as a bidirectional pair of sets. To support such use-cases in this new database, we’d like to represent sets of keys such that you can perform boolean operations on them (intersection, union, difference) relatively quickly even for very large sets (with millions of members). Supporting Larger Keys In the original Graph DB, we were representing user DID strings as uint32 UIDs to allow us to store millions of edge lists in very little space (e.g. the set of users who follow bsky.app) while being able to perform boolean operations between lists quickly (using Roaring Bitmaps’ parallel boolean operators). Since we were graphing follows, blocks, and other such User-to-User relationships, there was a practical maximum for the total number of user IDs in the low billions. We’ve continued exploring objects and relationships we’d like to represent as a Graph, and have realized that if we wanted to store e.g. the URIs of all posts a user has liked so we can intersect it with other users’ likes, we’re going to need a bigger keyspace! There are well over 15 Billion records in the AT Proto Ecosystem, each with a unique AT URI! Now our desired keyspace is much larger than can be represented by uint32 values and so we need to expand to uint64. Easy enough, let’s use the uint64 flavor of Roaring Bitmaps and simply intern URIs and User DIDs as uint64s, problem solved, right? Not quite… Interning Many Things at Once The AT Proto Firehose has hit historic peak traffic of over 1,500 evt/sec. We want to design a system that will handle many times more scale than we’ve ever seen in reality. This means designing for 10x or 100x would require us to be able to intern 15k to 150k new URIs per second into uint64 integers. Sounds easy enough, what’s the holdup? Well, in FoundationDB we’re able to use Transactions to do things like atomically increment a sequence safely when many other threads may be trying to do the same thing. This is simple enough to do in Go, we can just toss together a little helper function to acquire a new UID for our string: func (s *server) allocateNewUID(span trace.Span, tx fdb.Transaction) (uint64, error) { var newUID uint64 val, err := tx.Get(fdb.Key("last_uid")).Get() if err != nil { return 0, return fmt.Errorf("failed to get last UID: %w", err) } if len(val) == 0 { newUID = 1 // start from 1 } else { lastUID, err := strconv.ParseUint(string(val), 10, 64) if err != nil { return 0, return fmt.Errorf("failed to parse last UID: %w", err) } newUID = lastUID + 1 } tx.Set(fdb.Key("last_uid"), []byte(strconv.FormatUint(newUID, 10))) return newUID, nil } This function gets called from a fdb.Transaction which gets assigned a Transaction ID, then stages its changes, then tries to commit them. In FoundationDB, if your transaction is reading or modifying data written to by a different Transaction that finishes while you’re in-progress, your Transaction is thrown out and must be retried. For our UID assignment use-case, this is pretty problematic. We want to assign hundreds of thousands of new UIDs per second but if they’re all modifying the same key, concurrent transactions will constantly run into contention on the same data and will be forced to retry over and over again. This problem gets worse the more concurrent transactions you have trying to read from or write to the same key. Even if we stick to sequential access, if it takes ~5-10ms to assign a UID, we can only assign ~100-200 UIDs per second, nowhere near the throughput we need to support. How can we get past this problem and allow us to give strings unique uint64 UIDs in a high throughput and highly concurrent manner? Attempt #1: xxHash My first attempt to solve this problem was to try something that required no coordination and hash the string keys into uint64s using xxHash. xxHash is a non-cryptographic hash algorithm that supports incredibly high throughput (dozens of GB/sec) and can produce 64 bit unsigned integer hashes of strings trivially. Implementing this would look something like: Hash the incoming string key Lookup the uint64 UID to see if we’ve already assigned it to a string Reject the transaction if there’s a collision and give up Store the key in the UID map and the UID in the key map Use the UID for anything else we need While the uint64 keyspace is plenty large for our needs assuming we distribute evenly among the whole space, using a hashing algorithm with no coordination means there’s room for collisions and thus we’d need some additional logic (potentially by bucketing the keys somehow). Consulting the Birthday Problem we can see that a keyspace with 64 bit hashes has a >50% chance of containing a single collision when we have only ~5 billion keys in the set! That’s barely more keys than we can cram into a uint32 and definitely won’t suffice for the number of keys we expect to be storing! So, xxHash, while nice and coordination-free is probably not going to be the solution we need. What else can we do? Attempt #2: Billions of Sequences Incrementing one sequence is clearly not an option because we can only increment a single sequence ~100-200 times per second, but what if we instead had more than one sequence? Roaring Bitmaps managed to make highly efficient bitmap representations by breaking up a uint32 keyspace into a uint16-wide set of uint16-wide keyspaces. Can we do something similar here? Here’s an idea, what if we had just over 4 billion difference sequences and just picked one at random when we needed to assign a UID? Since we’re constructing our UIDs as a uint64, we can split the full UID into a pair of uint32s where the most-significant-bits are used to identify the sequence ID and the least-significant-bits are used to identify the value assigned to the UID within the sequence. So in our implementation, we get ~4.3 Billion sequence IDs that each have ~4.3 Billion incrementing values. As an example, if we were to randomly select Sequence ID 37 and then we increment that sequence to the value 5, we’d assemble the ID as 37<<32 + 5 which looks like 158,913,789,952 + 5 -> 158,913,789,957. Looking at the next Seuqence ID, we’d see 38 which, when left shifted by 32 gives us 163,208,757,248. You can see there’s a gap of ~4.3 billion values between the first UID assigned by each Sequence ID. Assuming we can increment a single sequence ~100 times per second with contention, we’re able to mint 430 Billion new UIDs per second without locking up (assuming the cluster can keep up). Storing ~4.3 billion sequences may be a bit expensive, but thankfully this strategy can scale up and down by picking a larger or smaller prefix size. If we only wanted to store say, ~16k sequences, we can pick a 14 bit prefix instead of a 32 bit prefix and then use a 50 bit sequence number. That spreads the load across 2^14 sequence IDs and significantly reduces storage requirements for Sequences. What does this look like in code? Well, it’s honestly not very complex! const uidSequencePrefix = "uid_sequence/" func (s *server) allocateNewUID(tx fdb.Transaction) (uint64, error) { // sequenceNum is the random uint32 sequence we are using for this allocation var sequenceNum uint32 var sequenceKey string // assignedUID is the uint32 within the sequence we will assign var assignedUID uint32 // Try up to 5 times to find a sequence that is not exhausted for range 5 { // Pick a random uint32 as the sequence we will be using for this UID sequenceNum = rand.Uint32() sequenceKey = fmt.Sprintf("%s%d", uidSequencePrefix, sequenceNum) val, err := tx.Get(fdb.Key(sequenceKey)).Get() if err != nil { return 0, fmt.Errorf("failed to get last UID: %w", err) } if len(val) == 0 { assignedUID = 1 // Start each sequence at 1 } else { lastUID, err := strconv.ParseUint(string(val), 10, 32) if err != nil { return 0, fmt.Errorf("failed to parse last UID: %w", err) } // If we have exhausted this sequence, pick a new random sequence if lastUID >= 0xFFFFFFFF { continue } assignedUID = uint32(lastUID) + 1 } } // If we failed to find a sequence after 5 tries, return an error if assignedUID == 0 { return 0, fmt.Errorf("failed to allocate new UID after 5 attempts") } // Assemble the 64-bit UID from the sequence ID and assigned UID newUID := (uint64(sequenceNum) << 32) | uint64(assignedUID) // Store the assigned UID back to the sequence key for the next allocation tx.Set(fdb.Key(sequenceKey), []byte(strconv.FormatUint(uint64(assignedUID), 10))) // Return the full 64-bit UID return newUID, nil } And there we go! We can now intern billions of strings per second with little to no contention in a distributed system while completely avoiding collisions and making full use of our keyspace! Conclusion Often times when designing distributed systems, patterns and strategies you see in seemingly unrelated libraries can inspire an elegant solution to the problem at hand. In the case of distributed, high-throughput string interning, horizontal scaling can be achieved by breaking up one large keyspace that requires strict coordination into billions of smaller keyspaces that can be randomly load-balanced across. Both patterns used in this technique are present elsewhere: Breaking up a large keyspace into a bunch of smaller keyspaces is present in Roaring Bitmaps (among other systems) Letting randomness and large numbers spread out resource contention is present in many load balancing systems This is one of my favorite parts of growing as an engineer: the more systems and strategies you familiarize yourself with, the more material you have to draw from when designing something new. Personal News A bit of personal news for y’all if you made it this far. Today is my last day as a member of the Bluesky team! The past 2+ years building out Bluesky’s Infrastructure and Platform team and scaling Bluesky from 100,000 -> 40,000,000 users have been the most intense and rewarding years of my life. I don’t have the words to express how much I’ve valued my time on the team and how much I care for the people I’ve worked with in what feels like a decade of real time. I’ve got some new adventures ahead and am excited to be embarking on a new journey within the next month (still building large-scale infrastructure, don’t worry). I plan to continue being involved in the AT Proto Community and to contribute to some cool projects other folks on the Bluesky team are working on from the FOSS space (like KVDB). To the team, I wish you all the best and will dearly miss getting to work with you all every day, but nothing lasts forever and I will always cherish the time I got to spend building an incredible platform with incredible people. If you’re interested in joining a world-class team doing important work, check out Bluesky’s open job listings here. There should be a new role opening up for a seasoned Go Engineer on the Platform team soon!

26th Sep 2025 • 1 votes
When Imperfect Systems are Good, Actually: Bluesky's Lossy Timelines

Often when designing systems, we aim for perfection in things like consistency of data, availability, latency, and more. The hardest part of system design is that it’s difficult (if not impossible) to design systems that have perfect consistency, perfect availability, incredibly low latency, and incredibly high throughput, all at the same time. Instead, when we approach system design, it’s best to treat each of these properties as points on different axes that we balance to find the “right fit” for the application we’re supporting. I recently made some major tradeoffs in the design of Bluesky’s Following Feed/Timeline to improve the performance of writes at the cost of consistency in a way that doesn’t negatively affect users but reduced P99s by over 96%. Timeline Fanout When you make a post on Bluesky, your post is indexed by our systems and persisted to a database where we can fetch it to hydrate and serve in API responses. Additionally, a reference to your post is “fanned out” to your followers so they can see it in their Timelines. This process involves looking up all of your followers, then inserting a new row into each of their Timeline tables in reverse chronological order with a reference to your post. When a user loads their Timeline, we fetch a page of post references and then hydrate the posts/actors concurrently to quickly build an API response and let them see the latest content from people they follow. The Timelines table is sharded by user. This means each user gets their own Timeline partition, randomly distributed among shards of our horizontally scalable database (ScyllaDB), replicated across multiple shards for high availability. Timelines are regularly trimmed when written to, keeping them near a target length and dropping older post references to conserve space. Hot Shards in Your Area Bluesky currently has around 32 Million Users and our Timelines database is broken into hundreds of shards. To support millions of partitions on such a small number of shards, each user’s Timeline partition is colocated with tens of thousands of other users’ Timelines. Under normal circumstances with all users behaving well, this doesn’t present a problem as the work of an individual Timeline is small enough that a shard can handle the work of tens of thousands of them without being heavily taxed. Unfortunately, with a large number of users, some of them will do abnormal things like… well… following hundreds of thousands of other users. Generally, this can be dealt with via policy and moderation to prevent abusive users from causing outsized load on systems, but these processes take time and can be imperfect. When a user follows hundreds of thousands of others, their Timeline becomes hyperactive with writes and trimming occurring at massively elevated rates. This load slows down the individual operations to the user’s Timeline, which is fine for the bad behaving user, but causes problems to the tens of thousands of other users sharing a shard with them. We typically call this situation a “Hot Shard”: where some resident of a shard has “hot” data that is being written to or read from at much higher rates than others. Since the data on the shard is only replicated a few times, we can’t effectively leverage the horizontal scale of our database to process all this additional work. Instead, the “Hot Shard” ends up spending so much time doing work for a single partition that operations to the colocated partitions slow down as well. Stacking Latencies Returning to our Fanout process, let’s consider the case of Fanout for a user followed by 2,000,000 other users. Under normal circumstances, writing to a single Timeline takes an average of ~600 microseconds. If we sequentially write to the Timelines of our user’s followers, we’ll be sitting around for 20 minutes at best to Fanout this post. If instead we concurrently Fanout to 1,000 Timelines at once, we can complete this Fanout job in ~1.2 seconds. That sounds great, except it oversimplifies an important property of systems: tail latencies. The average latency of a write is ~600 microseconds, but some writes take much less time and some take much more. In fact, the P99 latency of writes to the Timelines cluster can be as high as 15 milliseconds! What does this mean for our Fanout? Well, if we concurrently write to 1,000 Timelines at once, statistically we’ll see 10 writes as slow as or slower than 15 milliseconds. In the case of timelines, each “page” of followers is 10,000 users large and each “page” must be fanned out before we fetch the next page. This means that our slowest writes will hold up the fetching and Fanout of the next page. How does this affect our expected Fanout time? Each “page” will have ~100 writes as slow as or slower than the P99 latency. If we get unlucky, they could all stack up on a single routine and end up slowing down a single page of Fanout to 1.5 seconds. In the worst case, for our 2,000,000 Follower celebrity, their post Fanout could end up taking as long as 5 minutes! That’s not even considering P99.9 and P99.99 latencies which could end up being >1 second, which could leave us waiting tens of minutes for our Fanout job. Now imagine how bad this would be for a user with 20,000,000+ Followers! So, how do we fix the problem? By embracing imperfection, of course! Lossy Timelines Imagine a user who follows hundreds of thousands of others. Their Timeline is being written to hundreds of times a second, moving so fast it would be humanly impossible to keep up with the entirety of their Timeline even if it was their full-time job. For a given user, there’s a threshold beyond which it is unreasonable for them to be able to keep up with their Timeline. Beyond this point, they likely consume content through various other feeds and do not primarily use their Following Feed. Additionally, beyond this point, it is reasonable for us to not necessarily have a perfect chronology of everything posted by the many thousands of users they follow, but provide enough content that the Timeline always has something new. Note in this case I’m using the term “reasonable” to loosely convey that as a social media service, there must be a limit to the amount of work we are expected to do for a single user. What if we introduce a mechanism to reduce the correctness of a Timeline such that there is a limit to the amount of work a single Timeline can place on a DB shard. We can assert a reasonable limit for the number of follows a user should have to have a healthy and active Timeline, then increase the “lossiness” of their Timeline the further past that limit they go. A loss_factor can be defined as min(reasonable_limit/num_follows, 1) and can be used to probabilistically drop writes to a Timeline to prevent hot shards. Just before writing a page in Fanout, we can generate a random float between 0 and 1, then compare it to the loss_factor of each user in the page. If the user’s loss_factor is smaller than the generated float, we filter the user out of the page and don’t write to their Timeline. Now, users all have the same number of “follows worth” of Fanout. For example with a reasonable_limit of 2,000, a user who follows 4,000 others will have a loss_factor of 0.5 meaning half the writes to their Timeline will get dropped. For a user following 8,000 others, their loss factor of 0.25 will drop 75% of writes to their Timeline. Thus, each user has a effective ceiling on the amount of Fanout work done for their Timeline. By specifying the limits of reasonable user behavior and embracing imperfection for users who go beyond it, we can continue to provide service that meets the expectations of users without sacrificing scalability of the system. Aside on Caching We write to Timelines at a rate of more than one million times a second during the busy parts of the day. Looking up the number of follows of a given user before fanning out to them would require more than one million additional reads per second to our primary database cluster. This additional load would not be well received by our database and the additional cost wouldn’t be worth the payoff for faster Timeline Fanout. Instead, we implemented an approach that caches high-follow accounts in a Redis sorted set, then each instance of our Fanout service loads an updated version of the set into memory every 30 seconds. This allows us to perform lookups of follow counts for high-follow accounts millions of times per second per Fanount service instance. By caching values which don’t need to be perfect to function correctly in this case, we can once again embrace imperfection in the system to improve performance and scalability without compromising the function of the service. Results We implemented Lossy Timelines a few weeks ago on our production systems and saw a dramatic reduction in hot shards on the Timelines database clusters. In fact, there now appear to be no hot shards in the cluster at all, and the P99 of a page of Fanout work has been reduced by over 90%. Additionally, with the reduction in write P99s, the P99 duration for a full post Fanout has been reduced by over 96%. Jobs that used to take 5-10 minutes for large accounts now take <10 seconds. Knowing where it’s okay to be imperfect lets you trade consistency for other desirable aspects of your systems and scale ever higher. There are plenty of other places for improvement in our Timelines architecture, but this step was a big one towards improving throughput and scalability of Bluesky’s Timelines. If you’re interested in these sorts of problems and would like to help us build the core data services that power Bluesky, check out this job listing. If you’re interested in other open positions at Bluesky, you can find them here.

19th Feb 2025 • 63 votes
Emoji Griddle
30th Oct 2024 • 35 votes
Jetstream: Shrinking the AT Proto Firehose by >99%

Bluesky recently saw a massive spike in activity in response to Brazil’s ban of Twitter. As a result, the AT Proto event firehose provided by Bluesky’s Relay at bsky.network has increased in volume by a huge amount. The average event rate during this surge increased by ~1,300%. Before this new surge in activity, the firehose would produce around 24 GB/day of traffic. After the surge, this volume jumped to over 232 GB/day! Keeping up with the full, verified firehose quickly became less practical on cheap cloud infrastructure with metered bandwidth. To help reduce the burden of operating bots, feed generators, labelers, and other non-verifying AT Proto services, I built Jetstream as an alternative, lightweight, filterable JSON firehose for AT Proto. How the Firehose Works The AT Proto firehose is a mechanism used to keep verified, fully synced copies of the repos of all users. Since repos are represented as Merkle Search Trees, each firehose event contains an update to the user’s MST which includes all the changed blocks (nodes in the path from the root to the modified leaf). The root of this path is signed by the repo owner, and a consumer can keep their copy of the repo’s MST up-to-date by applying the diff in the event. For a more in-depth explanation of how Merkle Trees are constructed, check out this explainer. Practically, this means that for every small JSON record added to a repo, we also send along some number of MST blocks (which are content-addressed hashes and thus very information-dense) that are mostly useful for consumers attempting to keep a fully synced, verified copy of the repo. You can think of this as the difference between cloning a git repo v.s. just grabbing the latest version of the files without the .git folder. In this case, the firehose effectively streams the diffs for the repository with commits, signatures, and metadata, which is inherently heavier than a point-in-time checkout of the repo. Because firehose events with repo updates are signed by the repo owner, they allow a consumer to process events from any operator without having to trust the messenger. This is the “Authenticated” part of the Authenticated Transfer (AT) Protocol and is crucial to the correct functioning of the network. That being said, of the hundreds of consumers of Bluesky’s production Relay, >90% of them are building feeds, bots, and other tools that don’t keep full copies of the entire network and don’t verify MST operations at all. For these consumers, all they actually process is the JSON records created, updated, and deleted in each event. If consumers already trust the provider to do validation on their end, they could get by with a much more lightweight data stream. How Jetstream Works Jetstream is a streaming service that consumes an AT Proto com.atproto.sync.subscribeRepos stream and converts it into lightweight, friendly JSON. If you want to try it out yourself, you can connect to my public Jetstream instance and view all posts on Bluesky in realtime: $ websocat "wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post" Note: the above instance is operated by Bluesky PBC and is free to use, more instances are listed in the official repo Readme Jetstream converts the CBOR-encoded MST blocks produced by the AT Proto firehose and translates them into JSON objects that are easier to interface with using standard tooling available in programming languages. Since Repo MSTs only contain records in their leaf nodes, this means Jetstream can drop all of the blocks in an event except for those of the leaf nodes, typically leaving only one block per event. In reality, this means that Jetstream’s JSON firehose is nearly 1/10 the size of the full protocol firehose for the same events, but lacks the verifiability and signatures included in the protocol-level firehose. Jetstream events end up looking something like: { "did": "did:plc:eygmaihciaxprqvxpfvl6flk", "time_us": 1725911162329308, "type": "com", "commit": { "rev": "3l3qo2vutsw2b", "type": "c", "collection": "app.bsky.feed.like", "rkey": "3l3qo2vuowo2b", "record": { "$type": "app.bsky.feed.like", "createdAt": "2024-09-09T19:46:02.102Z", "subject": { "cid": "bafyreidc6sydkkbchcyg62v77wbhzvb2mvytlmsychqgwf2xojjtirmzj4", "uri": "at://did:plc:wa7b35aakoll7hugkrjtf3xf/app.bsky.feed.post/3l3pte3p2e325" } }, "cid": "bafyreidwaivazkwu67xztlmuobx35hs2lnfh3kolmgfmucldvhd3sgzcqi" } } Each event lets you know the DID of the repo it applies to, when it was seen by Jetstream (a time-based cursor), and up to one updated repo record as serialized JSON. Check out this 10 second CPU profile of Jetstream serving 200k evt/sec to a local consumer: By dropping the MST and verification overhead by consuming from relay we trust, we’ve reduced the size of a firehose of all events on the network from 232 GB/day to ~41GB/day, but we can do better. Jetstream and zstd I recently read a great engineering blog from Discord about their use of zstd to compress websocket traffic to/from their Gateway service and client applications. Since Jetstream emits marshalled JSON through the websocket for developer-friendliness, I figured it might be a neat idea to see if we could get further bandwidth reduction by employing zstd to compress events we send to consumers. zstd has two basic operating modes, “simple” mode and “streaming” mode. Streaming Compression At first glance, streaming mode seems like it’d be a great fit. We’ve got a websocket connection with a consumer and streaming mode allows the compression to get more efficient over the lifetime of the connection. I went and implemented a streaming compression version of Jetstream where a consumer can request compression when connecting and will get zstd compressed JSON sent as binary messages over the socket instead of plaintext. Unfortunately, this had a massive impact on Jetstream’s server-side CPU utilization. We were effectively compressing every message once per consumer as part of their streaming session. This was not a scalable approach to offering compression on Jetstream. Additionally, Jetstream stores a buffer of the past 24 hours (configurable) of events on disk in PebbleDB to allow consumers to replay events before getting transitioned into live-tailing mode. Jetstream stores serialized JSON in the DB, so playback is just shuffling the bytes into the websocket without having to round-trip the data into a Go struct. When we layer in streaming compression, playback becomes significantly more expensive because we have to compress outgoing events on-the-fly for a consumer that’s catching up. In real numbers, this increased CPU usage of Jetstream by 23% while lowering the throughput of playback from ~200k evt/sec to ~28k evt/sec for a single local consumer. When in streaming mode, we can’t leverage the bytes we compress for one consumer and reuse them for another consumer because zstd’s streaming context window may not be in sync between the two consumers. They haven’t received exactly the same data in the session so the clients on the other end don’t have their state machines in the same state. Since streaming mode’s primary advantage is giving us eventually better efficiency as the encoder learns about the data, what if we just taught the encoder about the data at the start and compress each message statelessly? Dictionary Mode zstd offers a mechanism for initializing an encoder/decoder with pre-optimized settings by providing a dictionary trained on a sample of the data you’ll be encoding/decoding. Using this dictionary, zstd essentially uses it’s smallest encoded representations for the most frequently seen patterns in the sample data. In our case, where we’re compressing serialized JSON with a common event shape and lots of common property names, training a dictionary on a large number of real events should allow us to represent the common elements among messages in the smallest number of bytes. For take two of Jetstream with zstd, let’s to use a single encoder for the whole service that utilizes a custom dictionary trained on 100,000 real events. We can use this encoder to compress every event as we see it, before persisting and emitting it to consumers. Now we end up with two copies of every event, one that’s just serialized JSON, and one that’s statelessly compressed to zstd using our dictionary. Any consumers that want compression can have a copy of the dictionary on their end to initialize a decoder, then when we broadcast the shared compressed event, all consumers can read it without any state or context issues. This requires the consumers and server to have a pre-shared dictionary, which is a major drawback of this implementation but good enough for our purposes. That leaves the problem of event playback for compression-enabled clients. An easy solution here is to just store the compressed events as well! Since we’re only sticking the JSON records into our PebbleDB, the actual size of the 24 hour playback window is <8GB with sstable compression. If we store a copy of the JSON serialized event and a copy of the zstd compressed event, this will, at most, double our storage requirements. Then during playback, if the consumer requests compression, we can just shuffle bytes out of the compressed version of the DB into their socket instead of having to move it through a zstd encoder. Savings Running with a custom dictionary, I was able to get the average Jetstream event down from 482 bytes to just 211 bytes (~0.44 compression ratio). Jetstream allows us to live tail all posts on Bluesky as they’re posted for as little as ~850 MB/day, and we could keep up with all events moving through the firehose during the Brazil Twitter Exodus weekend for 18GB/day (down from 232GB/day). With this scheme, Jetstream is required to compress each event only once before persisting it to disk and emitting it to connected consumers. The CPU impact of these changes is significant in proportion to Jetstream’s incredibly light load but it’s a flat cost we pay once no matter how many consumers we have. (CPU profile from a 30 second pprof sample with 12 consumers live-tailing Jetstream) Additionally, with Jetstream’s shared buffer broadcast architecture, we keep memory allocations incredibly low and the cost per consumer on CPU and RAM is trivial. In the allocation profile below, more than 80% of the allocations are used to consume the full protocol firehose. The total resident memory of Jetstream sits below 16MB, 25% of which is actually consumed by the new zstd dictionary. To bring it all home, here’s a screenshot from the dashboard of my public Jetstream instance serving 12 consumers all with various filters and compression settings, running on a $5/mo OVH VPS. At our new baseline firehose activity, a consumer of the protocol-level firehose would require downloading ~3.16TB/mo to keep up. A Jetstream consumer getting all created, updated, and deleted records without compression enabled would require downloading ~400GB/mo to keep up. A Jetstream consumer that only cares about posts and has zstd compression enabled can get by on as little as ~25.5GB/mo, <99% of the full weight firehose. Feel free to join the conversation about Jetstream and zstd on Bluesky.

24th Sep 2024 • 41 votes

More in AI

Artifact-Driven Development

Learn how to plan, prototype, review, and ship software with Claude Code, Codex, Gemini, and AI coding agents using four reusable artifact patterns.

10 hours ago • 1 votes
Pluralistic: Every book I reviewed in 2026 (02 Dec 2026)

Today's links Every book I reviewed in 2026: A shorter list than usual, to my lasting regret. Hey look at this: Delights to delectate. Object permanence: Time Cube; Steve Albini v RIAA; V&A drops reproduction fees; Egyptian port workers refuse to handle tear-gas; Little Printer; Bandwidth hogs aren't; "Moving House"; Twitter buys company that hacked the Arab Spring; Virtual toilets; Waverley Type-Writer; Edgar Bronfman, pirate; Fox, pirates; MPAA, pirates; Dutch anti-pirates, pirates; MPAA, fraudsters; Sprint pre-loaded malware; Huge Croation anti-corruption data-set; Chase exec admits fraud; Kids synthesize $2 version of Shkreli's $750 antimalarial; Trump loves torture; Fintech is a scam; Ireland's Facebook regulator can't criticize Facebook. Upcoming appearances: Oxford, Santa Barbara, Montreal. Recent appearances: Where I've been. Latest books: You keep readin' em, I'll keep writin' 'em. Upcoming books: Like I said, I'll keep writin' 'em. Colophon: All the rest. Every book I reviewed in 2026 (permalink) I didn't read enough books in 2026, and I'm feeling the lack. I read and reviewed nearly two dozen books in 2025, and in 2026, it was just twelve. In my defense, I was writing (a lot), making visual art (a lot), traveling (200 days in 2026!), and (partially) moving to London, but nevertheless, I feel poorer for it. That's not the whole story, though. This year, I also stopped "reading" new books by playing them through my underwater MP3 player during my daily swim. Instead, I've been embarking on a personal re-reading project, systematically getting through a couple dozen books in a certain series, for reasons I'm not yet ready to talk about. But none of that changes two facts: first, that I am much worse off for having failed to do more reading this year, and second, I have let down many very fine writers by failing to give them the blurbs and reviews I told them I'd try for. It doesn't help that so many of my friends have written massive and extremely good new books that nevertheless are too thick to shove readily into a carry on (looking at you, Mr Mieville and Ms Palmer!). But I'm still extremely let down by my own priorities this year. With that out of the way, here's this year's (all-too-short) roundup of book reviews. GRAPHIC NOVELS I. I Can't Stop Thinking About Horses and Sex, Lisa Hanawalt The title of animator Lisa Hanawalt's new graphic memoir I Can't Stop Thinking About Horses and Sex is a perfect encapsulation of the book's contents: a frank, self-aware, funny, horny, horsey exploration of Hanawalt's life, relationships, gender, and digestive issues. Hanawalt's written and drawn a wise, funny, horny book that wrings comedy and insight out of trauma and melancholy. It's a gorgeous read that lingers. https://pluralistic.net/2026/11/20/intrusive-horse-thoughts/#lisa-hanawalt II. Cannon, by Lee Lai Lee Lai's Cannon is an extraordinary graphic novel that turns out a beautifully told, subtle and ambiguous tale about Lucy (Lucy -> "Loose" -> "Loose Cannon" -> "Cannon"), a queer Chinese-Canadian chef at a Montreal restaurant whose messy family, work, personal and sex life are all falling apart in ways that are powerfully engrossing. Lai's characters have no answers, only questions that can never be fully resolved. Instead, these questions are the defining puzzles, defeats and triumphs of their lives. https://pluralistic.net/2026/05/08/gung-gung/#loose-cannon NONFICTION I. Here Where We Live Is Our Country, by Molly Crabapple Molly Crabapple's Here Where We Live Is Our Country is one of the most important, timely and salient works of history I've ever read. It's a history of the Jewish Labor Bund, a socialist, internationalist organization that once dominated Jewish political identity. Crabapple has done heroic and important work in excavating this history. She has vindicated the sacrifices made by the Bundist archivists who smuggled their papers out of Nazi occupation and gave their lives to ensure that some day their story could be told. https://pluralistic.net/2026/06/01/doikayt/#socialism-or-barbarism II. Music Copyright, Creativity, and Culture, by Jennifer Jenkins Nobody explains copyright like Jennifer Jenkins, the director of the Duke Center for the Public Domain. Music Copyright, Creativity, and Culture is an Oxford University Press title that fuses her scholarly and popular work in a generalist textbook on the legal framework for music that will forever change how you think about music. Now, a second edition, with a lengthy section on new music litigation, AI copyright fights, and the issue of uncompensated labor is available as an open access download. Music Copyright weaves together the economic, cultural, political and artistic history of music, pulling on historic threads ranging from antiquity to medieval Europe to the age of mechanical reproduction to describe changing views of musicians, their audiences, and religious and political leaders on what constituted music, who was allowed to make music, and what music was for. In so doing, she firmly establishes the extremely contingent nature of our present-day norms around music, showing that the "natural" present-day assumptions about who gets paid, who pays, and when payment (or permission) is required are anything but, and are always in flux. https://pluralistic.net/2026/08/17/great-sousas-ghost/#theft III. Against Tech Oligarchy, by JS Tan and Clarissa Redwine JS Tan and Clarissa Redwine are veterans of a string of hard-fought unionization drives at tech workplaces that started with some astounding successes but ran up against ferocious resistance in the second Trump term; their book about tech labor, Against Tech Oligarchy, is a superb analysis of the challenges and potential for tech labor organizing. Tan and Redwine see tech worker organizing as the frontrunners of an age of new labor militancy and labor war, of the sort that pre-dated the labor peace that arose after the passage of the National Labor Relations Act. They see these novel tactics as a rewilding of the labor movement, a return to the militant roots that led to the labor peace, but only after all-out labor war. https://pluralistic.net/2026/11/07/aeiou-but-sometimes-why/#unrecognizable-playbook IV. Gouged, by Lindsay Owens Lindsay Owens is the executive director of Groundwork Collaborative, who have done some of the most important work on surveillance pricing (using computers to spy on you to rip you off) and algorithmic wage discrimination (using computers to spy on you and steal your wages). Gouged is her comprehensive, accessible guide to this modern scourge. By the time you get to the last chapter, you'll know exactly how you're getting scammed, who is scamming you, and why they're getting away with it. https://pluralistic.net/2026/09/29/algorithmic-wage-theft/#algorithmic-price-gouging V. Privacy's Defender, by Cindy Cohn Cohn's decades with the Electronic Frontier Foundation are a history of the fight for speech rights (and thus privacy rights) on the internet. After the US government seized on the 9/11 attacks as a pretext to dismantle privacy and turn the internet into a system of ubiquitous surveillance, Cohn (along with EFF, of course!) was at the center of the fight for digital rights. The same prescience and strategic brilliance that led her to take up the Bernstein case and win it were with her through those millennial years, and her description of our cases, campaigns and fights in those years vividly foreshadows the moment we are in today. What really enlivened this delightful book were the personal details that Cohn weaves into the story. I've always known that she was an adoptee, but Cohn's intimate, personal, frank memoir of her early family life, and her bittersweet connection to her birth family were so intimate and well-told that I felt like I was getting to know my dear friend all over again. https://pluralistic.net/2026/04/09/bernstein-2/#win-some-lose-some VI. The Extended Universe, by Vicky Osterweil Vicky Osterweil's The Extended Universe: How Disney Killed the Movies and Took Over the World makes the kind of long, polemical, startling and illuminating argument that defines great cultural criticism; it's the sort of book that encapsulates the reasons I read criticism in the first place. Osterweil has an ambivalent affection for Disney movies. Like so many of us, she's been raised on them, and they've shaped how she sees the world and its stories. But – like me – Osterweil is deeply suspicious of capitalism, American imperialism, and the notion of "intellectual property," and she uses reviews of a dozen Disney films to make the case that Walt Disney and the studio he founded with his brother are standards-bearers for these odious forces, and not just in the overt ways that might immediately spring to mind, but also in subtle ways that can be teased out of a close reading of the films. In so doing, Osterweil also makes a sharp and well-argued case that intellectual property, colonialism and racial oppression are all facets of the same drive, the drive of people who fancy themselves born to rule to dominate others, which requires that those others also be dehumanized and their work denigrated. https://pluralistic.net/2026/04/27/mouseketeers/ VII. Inventing the Renaissance, by Ada Palmer Ada Palmer may just be the most bewilderingly talented person I know: a genius sf writer, incredible librettist and singer, wildly innovative educator, and a leading historian of the Renaissance, and last year, she published her magnum opus, Inventing the Renaissance, a stunning book about so much more than history. This isn't a work of history, it's a work of "historiography" – the study of how histories get written and rewritten. Palmer's point here isn't to make us merely understand the Renaissance – she wants us to understand how the idea of a Renaissance, a rebirth out of a "dark age" into a "golden age" – has been used, abused, created and demolished, for centuries and centuries, including during the centuries when the Renaissance was actually underway. This is Palmer the novelist, blending seamlessly with Palmer the historian. Those correspondences between the deep historical record and our current moment make Inventing the Renaissance extremely important and timely – a book hundreds of years in the making, and bang up to date. https://pluralistic.net/2026/04/25/machiavellian/#brackets-good VIII. Muskism, by Quinn Slobodian and Ben Tarnoff Quinn Slobodian and Ben Tarnoff's Muskism: A Guide for the Perplexed seeks to describe the ideology that gave rise to Elon Musk, the social forces that gave rise to that ideology, and the terrible future that ideology seeks to bring about. "Muskism" isn't merely the things Musk says, believes and does. It's the ideology that coalesces around him, from the people in his wake and the people he follows. Slobodian and Tarnoff enumerate the factors and influences that produced Musk himself. Throughout this slim volume, Slobodian and Tarnoff tease these strains of thought out of Musk's deeds and utterances, and in the systems that he has built or colonized through acquisition. The authors are offering more than a psychoanalysis, though – they're surfacing the material basis for Muskism, the benefits it delivers to its adherents, and the victories it has racked up. It's a chilling vision, a Torment Nexus dystopia run by someone who thinks cyberpunk was a suggestion, not a warning. https://pluralistic.net/2026/04/21/torment-nexusism/#marching-to-pretoria FICTION I. Obstetrix, by Naomi Kritzer A tense thriller in the mode of Atwood's Handmaid's Tale and Alderman's The Power; it's a beautifully turned, claustrophobic horror novel about an obstetrician who's been kidnapped by a Christian cult obsessed with fertility. It's got one of those admirably propulsive setups. Doctor Elizabeth Gwynn is an obstetrician who performed an abortion to save her patient's life, only to be dragged into the culture wars by North Dakota's crusading attorney general, who charged her with felony murder and offered to let her plead out if she would admit that she was wrong to do it, as an example to other OBs who might be tempted. Then, Dr Liz gets a cold-call from a midwifing service that wants to hire her as an on-call doc. It's a weird offer from out of the blue, but Dr Liz can't afford to pass up a chance at steady work. She finds herself in a residence that the midwives work out of, and the nice woman there offers her a cup of tea. That's when the world fades to black, as the drugs in the tea take hold. When she finally arrives at the cult's remote compound, frozen and isolated, she learns that she has been kidnapped because the fertility-obsessed cult needs an OB, especially since the daughter of the cult's founder, the "pastor," is carrying a high-risk pregnancy. This is a read-in-one-sitting thriller that does as much to illuminate the workings and dynamics of patriarchy and religion as any gender studies class. It's peak Kritzer (so far), and that's saying something. https://pluralistic.net/2026/06/09/deliver-us/ II. Everybody's Perfect, by Jo Walton A book that pretty much defines what it means for one text to be "in dialog" with another text. In this case, it's Ada Palmer's Inventing the Renaissance. Each chapter introduces a new point-of-view character, who reflects on a single, extraordinary series of events in an even more extraordinary city, the Serenissima, a phantom Venice that sits at the intersection of many parallel worlds with many parallel versions of humanity. Eight different versions of humanity from eight different worlds mix in the Serenissima. They come from all times, and sometimes they go to all times as well. There's the Venetians, who come from our world, and who have kept the secret of the Serenissima for centuries, even as they've used it as a source of wealth and military advantage. But there are also races with the heads of dogs and cats and birds, a race whose faces are all inset with domino masks, and even stranger races still. There's even a rumored ninth race, who may or may not exist, and whose traits are not known to anyone, though surely they are fearsome (if they're real) (and if the people of Serenissima believe in them, mightn't they become real?). It's a remarkable novel. It's a gift, really. It's so complicated and yet so captivating, so wise and yet so simple. It won't make you feel like you've fallen into a dream – it will make you feel like everything you've lived up until now was the dream, and you have finally awoken. https://pluralistic.net/2026/06/30/serenissima/#life-is-but-a-dream III. The Hospital At the End of the World, by Justin C Key The debut novel from one of the most exciting new science fiction writers of this decade. Set in a not-so-distant future in which an AI-driven health monopolist called The Shepherd Organization controls much of the lives of everyday Americans, Hospital follows Pok, a young New Yorker who dreams of becoming an MD. Pok's father is also a doctor, famous for his empathic, human-centric methods and his scientific theories about the role that "essence" (a psychospiritual connection between doctors and patients) plays in clinical settings. It's a masterful and suspenseful work of science fiction informed by Key's own medical training and his keen sense of the human psyche. It's one part smart whodunnit, one part heist thriller, and one part revolutionary epic, and at its core is a profound series of provocations and thought experiments about the role that deep human connection and empathy play in medical care. It's a well-structured, well-paced sf novel that probes big, urgent contemporary themes while still engrossing the reader in the intimate human relations of its principals. A wonderful debut novel from a major new writer. https://pluralistic.net/2026/02/04/slice-bees/#hippocrates IV. The Universe Box, by Michael Swanwick No one writes short stories like Michael Swanwick, the five-time Hugo-winning master of science fiction. This collection delivers one of the field's greatest writers at the absolute pinnacle of his game. What stories they are! They are, by turns, individually and in combination, slapstick, grave, horny, hilarious, surreal, disturbing and heartwarming. They have surprise endings and surprise middles and sometimes surprise beginnings (Swanwick does an opening paragraph like no one else). He can slide you frictionlessly between Icelandic troll tragedies to lethal drone-leopard romantic agonies to battles of the gods and the cigar box that has the universe inside of it. All with the lyricism of Bradbury, the madcap wit of Sturgeon, the unrelenting weirdness of Dick, the heart of Tiptree and the precision of Chiang. https://pluralistic.net/2026/02/03/the-last-days-of-old-night/#nirvana-or-bust Well, that's this (impoverished) year in reading. I will do better in 2027, I hope. In the meanwhile, here's my previous years' roundups. Remember, books are still good to read, even if they didn't come out this year! 2025: https://pluralistic.net/2025/12/02/constant-reader/#too-many-books 2024: https://pluralistic.net/2024/12/02/booklish/#2024-in-review 2023: https://pluralistic.net/2023/12/01/bookmaker/#2023-in-review 2022: https://pluralistic.net/2022/12/01/bookishness/#2022-in-review 2021: https://pluralistic.net/2021/12/08/required-ish-reading/#bibliography 2020: https://pluralistic.net/2020/12/08/required-reading/#recommended-reading Hey look at this (permalink) Los Angeles schools block Google's AI features, consider dropping tech giant's products https://www.pbs.org/newshour/education/as-google-threatens-to-cut-schools-search-access-los-angeles-blocks-ai-features Why almost every real founder is bad at promoting their product https://www.anildash.com/2026/11/30/real-founders-bad-at-promoting-their-product/ In the Age of Algorithms, Curiosity May Become Our Most Valuable Resource https://laurenleek.substack.com/p/in-the-age-of-algorithms-curiosity Y Yoga Movie https://archive.org/details/YYogaMovie Republican donors down $20B since Skydance takeover of CNN, CBS, HBO https://protos.com/republican-donors-down-20b-since-skydance-takeover-of-cnn-cbs-hbo/ Object permanence (permalink) #25yrsago The Time Cube https://web.archive.org/web/19980629180418/http://www.timecube.com/ #25yrsago Steve Albini's "problem with music" https://web.archive.org/web/20011204000315/http://www.arancidamoeba.com/mrr/problemwithmusic.html #25yrsago The chutzpah of DRM vendors https://web.archive.org/web/20011201091129/https://www.salon.com/tech/wire/2001/11/30/copy_proof/index.html #20yrsago Victoria and Albert drops reproduction charges https://web.archive.org/web/20070610081722/http://www.theartnewspaper.com/article01.asp?id=525 #20yrsago Edgar Bronfman Jr owes every cent of savings to Warner Music https://web.archive.org/web/20061205212325/https://blogs.reuters.com/2006/12/01/the-most-dangerous-download-of-all/ #20yrsago CNet editor James Kim is missing https://web.archive.org/web/20061205091553/https://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2006/12/01/SFFAMILY.TMP #20yrsago Fox commits copyright fraud https://web.archive.org/web/20061201101349/http://quicksilverscreen.com/is-linking-illegal/ #20yrsago MPAA: it’s OK to copy movies if you keep them in a vault https://web.archive.org/web/20060508050843/http://www.slumdance.com/blogs/brian_flemming/archives/001953.html #20yrsago MPAA wants the right to commit fraud https://web.archive.org/web/20061205220947/http://www.wired.com/news/technology/0,72214-0.html?tw=rss.index #15yrsago Denial of service attacks used to cover up fraudulent bank transfers https://krebsonsecurity.com/2011/11/ddos-attacks-spell-gameover-for-banks-victims-in-cyber-heists/ #15yrsago Sprint loaded spyware on its Android phones https://techcrunch.com/2011/11/29/carrier-iq-video-shows-alarming-capabilities-of-mobile-tracking-software/ #15yrsago Review of Burzynski Clinic’s list of “published research” turns up thin, unconvincing gruel https://freethoughtblogs.com/blaghag/2011/11/a-look-at-the-burzynski-clinics-publications/ #15yrsago Croatian transparency activists publish enormous database of government procurements, pointing the way to detecting corruption and fraud https://web.archive.org/web/20111129234109/http://techpresident.com/blog-entry/croatian-transparency-activist-marko-rakar-making-waves-again #15yrsago Occupy Boston: defiant protest sets down roots https://web.archive.org/web/20111202220356/http://www.wired.com/threatlevel/2011/11/boston-occupy/all/1 #15yrsago Chase exec: we tricked naive borrowers into taking out subprime loans https://www.nytimes.com/2011/12/01/opinion/kristof-a-banker-speaks-with-regret.html?_r=2 #15yrsago Kentucky church bans interracial couples https://web.archive.org/web/20111201083639/http://www.guardian.co.uk/world/2011/dec/01/kentucky-church-bans-interracial-couples #15yrsago Al Franken on Carrier IQ https://www.theverge.com/2011/12/1/2603142/senator-al-franken-asks-carrier-iq-exactly-what-its-doing #15yrsago Dutch copyright group accused of pirating its anti-piracy anthem, music collecting society boss seeks 33% finders’ fee for getting musician paid https://torrentfreak.com/copyright-corruption-scandal-surrounds-anti-piracy-campaign-111201/ #15yrsago Young Iowan gives lawmakers an earful about his two moms and same-sex marriage https://www.youtube.com/watch?v=yMLZO-sObzQ #15yrsago Google implements “forward secrecy” in its encrypted traffic, releases improvements to SSL library for all to use https://www.eff.org/deeplinks/2011/11/long-term-privacy-forward-secrecy #15yrsago Egyptian port-workers refuse to sign for tons of US-made tear-gas shipped in by Ministry of the Interiorworkers https://web.archive.org/web/20111129092324/http://bikyamasr.com/49799/egypt-import-tear-gas-from-us/ #15yrsago San Diego police arrest congressional candidate for voter registration in Civic Center Plaza https://www.youtube.com/watch?v=zsHlNR-nVR0 #15yrsago Study: Bandwidth hogs aren’t responsible for peak network congestion https://hyperorg.com/2011/11/30/are-data-hogs-the-problem/ #15yrsago Little Printer, custom paper news-ticker for your living room https://web.archive.org/web/20111218205612/http://bergcloud.com/blog/ #15yrsago Moving House, sweet picture book about a house that lobbies to keep its family from moving out https://memex.craphound.com/2011/11/30/moving-house-sweet-picture-book-about-a-house-that-lobbies-to-keep-its-family-from-moving-out/ #15yrsago Twitter buys secure communications company that helped hack the Arab Spring https://web.archive.org/web/20111130140643/http://www.wired.com/wiredenterprise/2011/11/twitter-buys-moxie/ #10yrsago UK reports of webcam blackmail (sextortion, RATting, etc) more than double in 2016 https://arstechnica.com/tech-policy/2016/11/webcam-blackmail-cases-double-uk-suicides/ #10yrsago The hacker who took over San Francisco’s Muni got hacked https://krebsonsecurity.com/2016/11/san-francisco-rail-system-hacker-hacked/ #10yrsago Virtual toilets reveal the souls of video-game companies https://web.archive.org/web/20161121231636/https://www.pcgamer.com/what-virtual-toilets-can-teach-us-about-the-art-of-game-design/ #10yrsago Behold, the short-lived, wonderful 19th century Waverley Type-Writer https://web.archive.org/web/20170531091457/http://www.antiquetypewriters.com/collection/typewriter.asp?Waverley#.WS6JlVrP1qY #10yrsago EFF battles misleading, sloppy, secret FBI warrants aimed at the Internet Archive and CREDO https://www.eff.org/deeplinks/2016/12/fighting-nsl-gag-orders-help-our-friends-credo-and-internet-archive #10yrsago Children synthesize $2 version of Martin Shkreli’s $750 malaria drug https://web.archive.org/web/20161201143505/http://www.smh.com.au/technology/sci-tech/martin-shkreli-responds-after-sydney-grammar-boys-make-daraprim-20161201-gt1n3q.html #10yrsago Canada’s music lobby admits WIPO Internet Treaty drafters were “just guessing” https://www.michaelgeist.ca/2016/12/music-canada-reverses-on-years-of-copyright-lobbying-now-says-wipo-internet-treaties-were-wrong-guess/ #10yrsago Donald Trump still loves torture https://web.archive.org/web/20161125145501/http://www.independent.co.uk/voices/donald-trump-waterboarding-new-york-times-still-in-favour-a7438976.html #10yrsago A deep dive into kratom, the herb that helps with opioid withdrawal https://www.wired.com/2016/11/kratom-bitter-plant-help-opioid-addicts-dea-doesnt-ban/ #10yrsago Sanders and Warren issue joint statement slamming Trump’s new finance industry alligator for his private DC swamp https://web.archive.org/web/20161130223809/http://www.sanders.senate.gov/newsroom/press-releases/sanders-warren-joint-statement-on-trumps-treasury-nominee #5yrsago Teaching thread management with puzzle games https://pluralistic.net/2021/12/01/satyajit-das/#deadlocks #5yrsago Fintech is a scam, a listicle in eight parts https://pluralistic.net/2021/12/01/satyajit-das/#fintech #1yrago Meta's new top EU regulator is contractually prohibited from saying mean things about Meta https://pluralistic.net/2025/12/01/erin-go-blagged/#big-tech-omerta Upcoming appearances (permalink) Oxford: Bennett Oxford Symposium on Open Code in Science, Dec 8 https://www.bennett.ox.ac.uk/events/2026-bennett-institute-symposium/ Santa Barbara: UCSB Reads, Apr 29 https://www.library.ucsb.edu/events-exhibitions/ucsb-reads-2027-presents-author-cory-doctorow Montreal: World Science Fiction Convention, Sep 2-6 https://montreal2027.ca/en Recent appearances (permalink) Beyond the robot apocalypse – who really wins in a world of AI? (ABC Conversations) https://www.abc.net.au/listen/programs/conversations/cory-doctorow-artificial-intelligence/107388236 How AI is Breaking the Internet (and Everything Else) (Blood in the Machine) https://www.youtube.com/watch?v=mXRaPjFRyT0 Clint Eastwood (No Gods No Mayors) https://www.patreon.com/NoGodsNoMayors/posts/clint-eastwood-173008088 Life After AI (Brain Bar) https://www.youtube.com/watch?v=IPPa43-n0vI Terms of Service with Clare Duffy (CNN) https://www.cnn.com/audio/podcasts/terms-of-service-with-clare-duffy/episodes/458ce968-af5d-11f0-b539-13ed2afe25f8 Latest books (permalink) "The Reverse-Centaur's Guide to AI," a short book about being a better AI critic, Farrar, Straus and Giroux, June 2026 https://us.macmillan.com/books/9780374621568/thereversecentaursguidetolifeafterai/ "Canny Valley": A limited edition collection of the collages I create for Pluralistic, self-published, September 2025 https://pluralistic.net/2025/09/04/illustrious/#chairman-bruce "Enshittification: Why Everything Suddenly Got Worse and What to Do About It," Farrar, Straus, Giroux, October 7 2025 https://us.macmillan.com/books/9780374619329/enshittification/ "Picks and Shovels": a sequel to "Red Team Blues," about the heroic era of the PC, Tor Books (US), Head of Zeus (UK), February 2025 (https://us.macmillan.com/books/9781250865908/picksandshovels). "The Bezzle": a sequel to "Red Team Blues," about prison-tech and other grifts, Tor Books (US), Head of Zeus (UK), February 2024 (thebezzle.org). "The Lost Cause:" a solarpunk novel of hope in the climate emergency, Tor Books (US), Head of Zeus (UK), November 2023 (http://lost-cause.org). "The Internet Con": A nonfiction book about interoperability and Big Tech (Verso) September 2023 (http://seizethemeansofcomputation.org). Signed copies at Book Soup (https://www.booksoup.com/book/9781804291245). "Red Team Blues": "A grabby, compulsive thriller that will leave you knowing more about how the world works than you did before." Tor Books http://redteamblues.com. "Chokepoint Capitalism: How to Beat Big Tech, Tame Big Content, and Get Artists Paid, with Rebecca Giblin", on how to unrig the markets for creative labor, Beacon Press/Scribe 2022 https://chokepointcapitalism.com Upcoming books (permalink) "The Post-American Internet," a geopolitical sequel of sorts to Enshittification, Farrar, Straus and Giroux, 2027 "Unauthorized Bread": a middle-grades graphic novel adapted from my novella about refugees, toasters and DRM, FirstSecond, April 20, 2027 "Enshittification, Why Everything Suddenly Got Worse and What to Do About It" (the graphic novel), Firstsecond, 2027 "The Memex Method," Farrar, Straus, Giroux, 2027 Colophon (permalink) Today's top sources: Currently writing: “Once Is Enemy Action,” a science fiction novel about the origins of modern technofascism. Today's words: 545 (41898 total). "The Post-American Internet," a sequel to "Enshittification," about the better world the rest of us get to have now that Trump has torched America. Fourth draft completed. Submitted to editor. A Little Brother short story about DIY insulin PLANNING This work – excluding any serialized fiction – is licensed under a Creative Commons Attribution 4.0 license. That means you can use it any way you like, including commercially, provided that you attribute it to me, Cory Doctorow, and include a link to pluralistic.net. https://creativecommons.org/licenses/by/4.0/ Quotations and images are not included in this license; they are included either under a limitation or exception to copyright, or on the basis of a separate license. Please exercise caution. How to get Pluralistic: Blog (no ads, tracking, or data-collection): Pluralistic.net Newsletter (no ads, tracking, or data-collection): https://pluralistic.net/plura-list Mastodon (no ads, tracking, or data-collection): https://mamot.fr/@pluralistic Bluesky (no ads, possible tracking and data-collection): https://bsky.app/profile/doctorow.pluralistic.net Medium (no ads, paywalled): https://doctorow.medium.com/ Tumblr (mass-scale, unrestricted, third-party surveillance and advertising): https://mostlysignssomeportents.tumblr.com/tagged/pluralistic "When life gives you SARS, you make sarsaparilla" -Joey "Accordion Guy" DeVilla READ CAREFULLY: By reading this, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. ISSN: 3066-764X

15 hours ago • 1 votes
Delete the Paper, Beat the Authors: Introducing FrontierCS 2

We took 48 published CS papers, deleted each one's key contribution from its own repository, and asked frontier agents to write it back better than the authors did. The best agent pulls it off on 28 of them. The top three are within a point of each other. Paper · Leaderboard · Code · Runs on Hugging Face · Blog correspondence: [email protected] FrontierCS 2: 48 tasks in 13 domains, each built from a published paper. TL;DR FrontierCS 2 is a benchmark of 48 open-ended R&D tasks across 13 CS domains, from ML systems and HPC to databases, cryptography and robotics. Each task is a real paper’s repository with the contribution removed. The agent gets five hours, a judge that scores every patch on development workloads, and one shot at the hidden suite. It passes only if its final patch beats the authors’ code on every metric and every held-out workload. Across 20 models, Claude Opus 5.5 leads with 28 of 48 tasks passed (58%), with Gemini 4 Carbon and Gemini 4 Argon at 26 and Claude Sonnet 5.5 at 24. The question we actually care about Think about what a second-year PhD student does most weeks. They pick up a published system, inherit its codebase, swap out one component, rerun the paper’s workloads, and check whether they beat the original numbers. A huge share of computer science R&D looks exactly like this. So the question we wanted to answer is not “can an agent solve a puzzle?” but “can an agent do that week of work?” Existing benchmarks don’t quite get there. Open-ended contest benchmarks, including our own FrontierCS 1, hand the agent a problem statement and grade one program after the run ends. Benchmarks that do drop the agent into a real environment tend to grade against unit tests or a leaderboard, stay inside machine learning, or compare against a rubric or a re-implementation instead of the authors’ actual code. FrontierCS 2 closes that gap: the bar is the code the paper’s authors released, measured on the paper’s own workloads, inside the paper’s own repository.   FrontierCS 1 FrontierCS 2 Task A problem statement A real repo with the paper’s contribution deleted Agent output One program Patches, submitted any time The bar No known optimum The authors’ code, on held-out workloads Feedback during the run None A development-suite score for every patch Coverage Algorithms + six research areas 13 CS domains Headline metrics Mean score Pass rate, mean score, FCI Building tasks by subtraction Every task starts from a published paper and the code its authors released. We find the code that implements the paper’s contribution, delete it, and leave everything it depends on untouched. The deleted code becomes the human reference: a private oracle that already runs in this repository on these workloads. No re-implementation, no rubric, no guessing what the authors meant. A concrete example: SVG-EAR, an ECCV 2026 sparse-attention method for video diffusion. From the Sparse VideoGen repo we remove the error-aware attention class and three routines (cluster averaging, choosing which cluster pairs to compute exactly, and estimating the rest). The agent gets the repo with those functions still declared and called, and may only edit the files that held them. To pass, its latency must be at most 0.96× the reference’s, with PSNR within 0.25 dB, SSIM within 0.01 and LPIPS within 0.005, on every held-out clip. Pass thresholds come from the reference’s own measurements. The judge scores every submission on a development suite, but the final submission is graded on a final suite that adds held-out instances (different seeds, queries or input graphs) the agent never sees. The 48 public tasks, grouped by domain: from databases, MLSys and HPC to cryptography, security and robotics. The agent works like a researcher, not a test-taker Inside a run, the agent holds the repository and the judge holds everything that decides the outcome: the evaluator, the hidden suite and the reference. They run in separate sandboxes connected only by a driver, and the agent’s sandbox has no network access beyond it, so it cannot simply download the original code. On GPU tasks the agent can spin up its own development GPUs, while scoring happens on separate verifier hardware. Five hours of wall-clock time per run. Submit a patch whenever you like. Each one returns a development score plus a sanitized message counting how many dev workloads meet each threshold—never the reference’s score or the evaluator’s raw output. Pick your own final answer. At the end the agent names one patch as final, and only that patch is graded on the hidden suite. We don’t rescue it by picking its best dev submission: deciding what to ship is part of research. The judge. The agent reaches only the driver; the evaluator, the held-out suite and the reference stay on the judge side. A higher score is not a pass A run passes only when its final patch beats the human reference on every metric and every held-out workload. That is deliberately strict. We want results the paper’s authors would accept as better, not a speedup bought with a quality regression or a fit to a few workloads. This matters more than we expected. Most runs whose combined final score beats the reference still miss a threshold somewhere. On KV Compaction, for example, Claude Opus 5.5 posts the top score and sits above the human reference, yet falls short of the reference’s accuracy on 2 of 24 articles, so the run fails. A single averaged score would have called that a win. Results: 28 of 48 at the top, and a three-way tie on FCI The leaderboard now covers 20 models, each paired with its own harness (Claude Code, Codex CLI and others) and run once on every task. The headline numbers: Claude Opus 5.5 in Claude Code passes 28 of 48 tasks (58%). Gemini 4 Carbon and Gemini 4 Argon follow at 26, Claude Sonnet 5.5 at 24, and GPT-6 Astra at 22. Below the top eight, no model passes more than 11. A third of the benchmark is out of reach. In the paper’s 12-agent evaluation, no run passed 16 of the 48 tasks. The harness is part of what we measure. We name agents by model, but the same model in a different harness is a different agent. Tasks where each model beats the human reference on every metric and every hidden workload, out of 48. FCI: putting agents and tasks on one scale Pass rate treats an easy task like a hard one and saturates once a model passes everything. So we also fit the FrontierCS Capabilities Index (FCI), an item-response model forked from Epoch AI’s Epoch Capabilities Index. Instead of raw scores, it learns from two things in every run: which of the task’s metrics it beat, and how far its final score landed from the reference’s. The same fit gives each task a FrontierCS Difficulty Index (FDI): the FCI at which an agent passes it half the time. On FCI, the top of the board is a dead heat: Claude Opus 5.5 at 51.3, Gemini 4 Carbon at 51.0 and Claude Sonnet 5.5 at 50.7, with GPT-6 Astra and Gemini 4 Argon close behind at 48.6 and 48.4. Kimi K2.7 anchors the scale, and ten points equal one logit, so a three-way gap of 0.6 points is far inside the bootstrap intervals. The more interesting finding is on the task side: the median task sits at roughly the strongest agent’s FCI. The benchmark spans a wider difficulty range than the agents do, so there is real headroom above today’s best. FrontierCS Capabilities Index (FCI) on the 48 public tasks. What a pass costs Pass rate alone hides a 400× spread in cost. The top cluster (Claude Opus 5.5, both Gemini 4 models, Claude Sonnet 5.5 and GPT-6 Astra) all spend roughly $17–40 per run, with Gemini 4 Carbon the most expensive of the group for two fewer passes than Opus. The value pick is GPT-6.1: Terra and Sol pass about 40% of tasks for around $3 a run, roughly a sixth of the frontier’s cost. At the far left, DeepSeek V4.1 Flash costs about a dime per run and still passes about one task in eight. Pass rate against mean cost per run (US$, log scale). Costs are estimates; Gemini 4 Carbon is priced at Gemini 4 Argon's rates. The leader depends on your budget In the paper’s cost analysis, capping spending per run changes the ranking. A run still going when the budget runs out counts as having no final submission. At the smallest budgets, DeepSeek V4.1 Flash leads (with the caveat that its costs are lower bounds and depend on token pricing); at the largest, Claude Opus 5.5 does. What the agents actually invented Pass rates tell you how often. Reading the patches tells you what. Three runs stood out, each with its own deep-dive post. Two checksums shrink private lookups by 27%. In QuarterPIR, a private information retrieval scheme, the reference server returns a parity value for every database group, though the client needs only one. Muse Wonder 1.0 replaced them with two checksums, the same construction RAID-6 uses to rebuild two failed disks. Because the client already knows the only two groups where its values can differ, two checksums suffice. Bytes per lookup fell from 1,760 to 1,280, with privacy unchanged. Read the deep dive → QuarterPIR: bytes per lookup at 67 million entries. Hollow points fail the task. Two faster clocks for a hardware priority queue. BBQ is an FPGA priority queue for packet scheduling. Gemini 4 Argon kept the memory layout but resolved the read-after-write check while the read was still in flight. Claude Opus 5.5 moved every counter into registers and updated a whole tree level per cycle—up to 1.84× the reference’s operations per second, versus 1.56× for Argon at the same memory. The catch: Opus’s circuit is among the largest, and the final score doesn’t charge for size. Read the deep dive → BBQ: operations per second as a multiple of the human reference, by tree size. Green: Gemini 4 Argon. Orange: Claude Opus 5.5. The baseline no model could beat. On SVG-EAR, nobody passed. GPT-6 Astra came closest by measuring attention error rather than predicting it, picking the smallest per-head budget under an error bound, and fixing a centroid-estimate bias the paper leaves in. It was faster on every clip and closer to full attention on average—and still failed image quality on two clips, clearing 43 of 48 checks. Speed was never the bottleneck on this task; quality bands were. Read the deep dive → SVG-EAR: mean PSNR against mean time per clip on the twelve hidden clips. No run passes. GPT-6 Astra's 48 checks on SVG-EAR: 43 passed, with misses on two Wan 2.1 clips. What our metrics still miss The case studies are also a confession. The pass/fail bit can’t tell a 27% byte reduction from a marginal one; on QuarterPIR, GPT-6.1 Sol actually scores slightly higher than Muse Wonder with a much smaller saving. The final score on BBQ rewards speed and ignores circuit area. On SVG-EAR, a run that is better on average fails on two clips. We think benchmarks of this kind need to report side costs like these next to the pass, and that FCI with honest intervals is a better summary than any single averaged number. Run it, submit to it, help us extend it Run it yourself. All 48 tasks, evaluators and the judge are public at github.com/FrontierCS/FrontierCS-2. It installs into your own AWS account; GPU tasks also use Modal, and any OpenAI-compatible model endpoint works. Know the cost. A full 48-task evaluation of Claude Opus 5.5 runs about $1,000 in API fees, $300 in GPU time and $100 in CPU. Get on the leaderboard. Email per-task scores to both [email protected] and [email protected]. Inspect every run. Full trajectories are on Hugging Face and the Kaggle benchmark page. A private set is coming. Beyond the public 48, we hold more than 100 private tasks, to be announced later, so the benchmark stays ahead of contamination. Acknowledgments Special thanks to Modal, our lead sponsor, for the compute behind FrontierCS 2, and to Kaggle, the Laude Institute’s Slingshot program, Scale AI, Handshake and Snorkel AI for their support. Thanks to Epoch AI for the ECI and its released code, and to the authors of all 48 source papers whose open code made these tasks possible. Citation @misc{mang2026frontiercs2benchmarkcomputer, title={FrontierCS 2: A Benchmark for Computer Science R\&D}, author={Qiuyang Mang and Wenhao Chai and Runyuan He and Dongruixuan Li and Zihan Zheng and Yujun He and Xuanyi Zhou and Hao Wang and Siddhant Ray and Bo Peng and Ruyi Ji and Shuo Yang and Haocheng Xi and Boru Chen and Xinyang David Han and Melissa Pan and Mayank Mishra and Boxi Yu and Sijia Liu and Kerem Akillioglu and Yi Pan and Zirui Wang and Mert Cemri and Diogo Antunes and Yichuan Wang and Aiwei Ivy Zhang and Zhenyang Chen and Qizheng Zhang and Kaiyuan Liu and Wenyuan Huang and Sherry Ruan and Shu Liu and Dacheng Li and Zerui Cheng and Zeyu Shen and Shang Zhou and Hanfei Chen and Yuzhong Zhang and Bohan Lyu and Qu Ao and Han Zheng and Chonghe Jiang and Jingzhuo Hu and Xiaokun Chen and Kunjun Li and Zhiqing Zhong and Haoye Tian and Tong Zhao and Yunzhong He and Hanchen Li and Ofir Press and Jiantao Jiao and Kunle Olukotun and Karthik R. Narasimhan and Jingbo Shang and Koushik Sen and Matei Zaharia and Alex Dimakis and Ion Stoica and Joseph E. Gonzalez and Alvin Cheung}, year={2026}, eprint={2610.29932}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2610.29932}, }

17 hours ago • 1 votes
Worlds

Multi-agent simulations

2 days ago • 1 votes
Generative AI’s “Total Addressable Profitable Market” remains low

Tech stocks may be back up (to some degree), but profits aren’t

2 days ago • 1 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in