Hey, welcome to HN!
Reading “hex” pointing to a clearly base62-ish string was a bit interesting :-)
Also, could we shard based on a short hash of account_id, and store the same hash in the token? This way we can lose the whole api_key → account_id lookup table in the metashard altogether.
Hello thanks for reading through my blog :D Coming to your question, yes! that is possible I mentioned it in my second approach!
But when I mentioned it to my senior he wanted me to default with the random string approach :)