Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
samwho
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
271.
▲
by
samwho
3y ago
You're absolutely right, I've corrected this. Thank you! I had originally written about threading and locality but it made the post too long and complicated, so I cut it out for the final draft. You can see remnants of it if you c
272.
▲
by
samwho
3y ago
I completely agree with you on this, though I couldn't find a great way to do it. It was suggested to me to put an outline around the allocation or free that just happened, but I struggled to get the box to look good when the allocatio
273.
▲
by
samwho
3y ago
Thanks so much, I really appreciate it. I'm glad you like the playground. If you don't mind me asking, what/where/how do you teach? I was actually hoping to get the attention of educators with this tool to see if it woul
274.
▲
by
samwho
3y ago
Nah, I just failed at basic arithmetic :D I wrote this: <div class="memory" bytes="32"> <malloc size="4" addr="0x0"></malloc> <malloc size="5" addr=&quo
275.
▲
by
samwho
3y ago
Good spot! Thank you. Fix on its way out now. :)
276.
▲
by
samwho
3y ago
A few people suggested a series, but there's a human problem: my attention jumps between topics quite a lot! At the end of this post, and my load balancing post, my main feeling was relief in that I could start looking into a new topic
277.
▲
by
samwho
3y ago
Yeah, I hear you. I've not done a lot of FFI stuff directly, it scares me. Arena allocators are cool, the idea is you allocate a large-ish region of memory and sub-allocate into it (often with a fast, simple allocator like a bump alloc
278.
▲
by
samwho
3y ago
It's funny, I saw and retweeted this while writing this post: https://twitter.com/samwhoo/status/1650572915770036225?s=20 Not sure the future you describe is where we'll end up, haven't given it a h
279.
▲
by
samwho
3y ago
Well shit. I think you're right.
280.
▲
by
samwho
3y ago
Really appreciate you taking the time to write this, thank you. I tried a couple of different ways to introduce the stack and the heap but it always felt like it made the post too long and complicated. In the end I decided to take a pure, i
281.
▲
by
samwho
3y ago
Also shout out Anton Verinov ( https://anton.codes/ ): the only reason this web page doesn't drain your battery before you get to the end of it.
282.
▲
by
samwho
3y ago
This feedback has made my day. Thank you. I'm inspired by Bartosz Ciechanowski and Julia Evans. The web is such a powerful toolbox. So many concepts are more complex than text alone can hope to explain. Those two are so creative and fu
283.
▲
by
samwho
3y ago
The playground was the inspiration for the post. I always wanted to be able to fiddle with malloc implementations and see how they work in this way. Admittedly the playground is hard to understand at first, and a touch janky in places. But
284.
▲
A visual introduction to memory allocation
(samwho.dev)
1 points
by
samwho
3y ago
|
0 comments
285.
▲
by
samwho
4y ago
It’s just plain JS, you can see it here: https://samwho.dev/js/load-balancers.js Just like the good old days :)
286.
▲
by
samwho
4y ago
Caching is something I want to cover in a separate post :)
287.
▲
by
samwho
4y ago
Yeah, it does! There are a few options, I’ll mention 2: 1. You can use DNS to return IP addresses to multiple load balancers. 2. You can have N load balancers that are themselves behind another, beefier load balancer. Plenty of other magica
288.
▲
by
samwho
4y ago
Weighted random is one of the algorithms available in the playground at the end. I did originally have a section talking about it but cut it for length reasons. Very few people in practice are serving 10K RPS.
289.
▲
by
samwho
4y ago
You have my blessing to try. The source is all in one file and is just plain JS, no minification or anything. I’ll warn you: the code is a bit messy. I wrote it knowing it was just for me and was a one off :D
290.
▲
by
samwho
4y ago
I do talk about variable request cost a fair bit, but I really don't think I did a good job visualising it. The rate at which each request shrinks while it's being processed by a server is meant to represent cost, but it's pr
291.
▲
by
samwho
4y ago
I didn't really want to go in to direct server return. I think most people will be more familiar with using something like nginx as a reverse proxy and load balancer at the same time. It is very cool tech, though. :)
292.
▲
by
samwho
4y ago
The colour palette I used on the graphs is the Wong palette I found at https://davidmathlogic.com/colorblind/ . Or are you talking about the animations? I reached out to some colourblind folks I knew before publishing a
293.
▲
by
samwho
4y ago
Yeah, they’d have to exist but it would be for quite a different purpose. I wonder if that would mean we could implement them in different ways, e.g have a health check service that everything pings and if a ping isn’t received for N minute
294.
▲
by
samwho
4y ago
Big ngrok fan, keep up the awesome work!
295.
▲
by
samwho
4y ago
Yes! This is called a “thundering herd” problem: https://en.m.wikipedia.org/wiki/Thundering_herd_problem . The topic is definitely much more complex than what I was able to cover in a single post :)
296.
▲
by
samwho
4y ago
I used https://pixijs.com/ . This was my first project with it and it was really nice to use. I fell in to a few traps here and there, but generally it wasn't too bad to get the results I wanted with it. :)
297.
▲
by
samwho
4y ago
Yeah, this for sure. Traffic mix changes over the life of an application. In k8s performance isolation certainly isn't a solved problem, and noisy neighbours can affect the "power" of a server. Any change to the application a
298.
▲
by
samwho
4y ago
You've got it, DNS is what's often used to solve this problem. Do a few resolutions of reddit.com, you can see them returning 4 different IP addresses in a randomised order. :)
299.
▲
by
samwho
4y ago
Least connections doesn't need shared state between the instances, but it would need shared state between the load balancers if you had more than one for sure. You're totally right, I glossed right over errors. With PEWMA and weig
300.
▲
by
samwho
4y ago
This and slow-start were on my original to-do list for this post, but I wanted to keep it to a certain length and complexity so they ended up getting cut. There's a tonne of cool stuff to visualise in this space, I was spoilt for choic
More ›