Short Links for Every Job
Every job the bots post, and every job in the listings READMEs, links through go.vansh.nyc so clicks can be counted.Every job gets a short link like go.vansh.nyc/BX. Clicking it lands on the real application page a few milliseconds later, and the click is counted on the way through. These are the counts, live:
Fast
A go link sends you on to the job in about 27 milliseconds, or about 40 for a job nobody near you has opened lately. The job site then takes about 430 ms just to start answering, so the link is under a tenth of the wait. Counting the click adds nothing: it’s saved after you’re already on your way.
| Step | Median | 90th percentile |
|---|---|---|
| go.vansh.nyc | 27 ms | 44 ms |
| The job site | 430 ms | 628 ms |
Every time
That’s not one lucky request. Here’s a pair of requests every 2 seconds for an hour: a link opened before, and a different job each time.
| Link | Median | 9 in 10 within | Slowest |
|---|---|---|---|
| Opened before | 27 ms | 44 ms | 210 ms |
| A different job each time | 40 ms | 62 ms | 2016 ms |
3,518 of 3,582 answered within 100 ms. Minute by minute, the median never passed 33 ms for a link opened before, or 48 for a different job. One took 2 seconds; every other request was faster than a typical job site starts answering.
A link for every job
New roles come from a sync job that runs every hour and commits them to the listings repos. The repos only ever hold go links. The real URLs live with the link service.
So the run starts by swapping every key for its real URL and ends by swapping them back, giving each new job a key on the way out. Everything in between (finding jobs, checking them, dropping duplicates, closing dead ones) works on real URLs, just as it did before go links existed.
If the link service doesn’t answer, the run commits nothing. A commit without the second swap would put real URLs back in the repo, so it waits for the next run instead.
Two characters
The first version gave every link 20 random characters. Now a key is the job’s row number, written with digits, then lowercase, then uppercase. The 2,353rd job is BX. Every job so far fits in two characters, and 238,327 would fit in three.
Rows are never reused, so two jobs can’t share a key and the same job always keeps its own. Named links like go.vansh.nyc/internships are at least 7 characters, and keys stop at 6, so a name can never equal a key.
The click
The redirect runs in the data center nearest whoever clicked. It looks in that data center’s cache first, then the nearest copy of the links, then the main one.
Discord and Slack open every link to draw its preview. Those are redirected like any other but aren’t counted.
Always a 302
A 301 tells the browser a link moved for good, so it remembers the job and skips go.vansh.nyc next time. Faster by a few milliseconds, and every repeat click disappears.
Counting
Every click is saved as its own record. The stats page could count them all each time it opens, but there are more every day, so every visit would be slower than the last.
Instead, each click adds one to a few tallies as it’s saved: its hour, its day, its job, and where the link was posted. The page reads the tallies, which stay the same size however many clicks pile up.
What a click keeps
The job, where the link was posted, when, and the kind of device. The IP address is scrambled before it’s saved, so the real one can’t be recovered. There’s no browser fingerprinting. Anything after the redirect, including whether someone applied, isn’t visible.