Pusher Engineering
making.pusher.com · Company blog · on HN since 2017
Pusher's engineering blog covers Go, Redis, networking, and MySQL, drawn from running a realtime messaging API service.
What HN saysHN links it for Go posts, like the one on real-time garbage collection, used to argue GC pauses matter little next to network latency.
25HN people shared it
8linked it in comments
24stories submitted
170story points
4 years agolast shared
2017people per year2026
Most-shared posts
- 1Golang’s Real-Time GC in Theory and Practice7 people · 5 points · first shared 2017 · 1 comments on HN
- 2Redis Pub/Sub under the hood6 people · 25 points · first shared 2017 · 2 comments on HN
- 3Alternatives to sum types in Go4 people · 10 points · first shared 2018 · 2 comments on HN
- 4Per-IP rate limiting with iptables3 people · 3 points · first shared 2017 · discussion on HN
- 5Go tool trace2 people · 107 points · first shared 2017 · 5 comments on HN
- 6How Pusher Channels has delivered 10,000,000,000,000 messages2 people · 6 points · first shared 2018 · discussion on HN
- 7Ephemeral port exhaustion and how to avoid it2 people · 4 points · first shared 2018 · discussion on HN
- 8GHC's Garbage Collector is optimized for throughput, not latency [2016]2 people · 3 points · first shared 2017 · discussion on HN
- 9Debugging MySQL replication lag by diving into the internals2 people · 3 points · first shared 2020 · discussion on HN
- 10Homepage2 people · first shared 2017
- 11Unit testing IO in Haskell1 people · 2 points · first shared 2018 · discussion on HN
- 12Ephemeral port exhaustion and how to avoid it1 people · 2 points · first shared 2018 · discussion on HN
- 13Top tips and tools for optimising haskell1 people · first shared 2020
What HN people wrote when they linked it
JackBroughton31 · 2020-03-02
Pusher | pusher.com | Old Street, London | Full-time | On-site
Pusher makes realtime APIs that power applications around the world - From chat, trading, maps, games, and any other realtime apps you can think of.
On the server-side, you'll help us use Go, Kubernetes, Ruby, and Redis to handle millions of connections and send 300K messages every second. On the client-side, you'll help us build great developer experiences with SDKs for JavaScript, Swift, Kotlin, Unity, and many more platforms.
We're around 60 people - mostly engineers. See what it's like to work here at https://making.pusher.com/.
Open roles:
- Senior Backend Engineer (https://apply.workable.com/pusher/j/A60FD87F52/)
- Ruby on Rails Full Stack Engineer (https://apply.workable.com/pusher/j/A7950329A8/)
email: [email protected] if you're interested to hear more
willsewell · 2017-04-21
Pusher: https://making.pusher.com/
Disclosure: I work there and have written articles for the blog.
At the moment we mainly blog about our experiences with Golang (our language of choice right now). But really it's open to any topic someone in our engineering team is interested in writing about.
We aim to keep things visual, interactive and example-based. For example Jim Fisher created an interactive animation of Golang's GC algorithm here: https://making.pusher.com/golangs-real-time-gc-in-theory-and-practice/… We also managed to embed Golang's trace visualiser within one of the posts: https://making.pusher.com/go-tool-trace/#tour-of-the-go-tool-trace-int… (using some pretty dirty tricks).
kinjba11 · 2022-11-23
Go does not have compile-time null safety or sum types :)
foo := Foo
{"hello"}
fooPointer := &foo
fooPointer = nil
fmt.Println(fooPointer.Bar)
> panic: runtime error: invalid memory address or nil pointer dereference
In a language like Kotlin a compile time error would prevent `fooPointer.Bar`, and in Rust `nil` does not exist. Go also does not have sum types, see for instance https://making.pusher.com/alternatives-to-sum-types-in-go/
gizzlon · 2018-01-16
Not needed for Go (IMHO) since any delay caused by GC pausing (1ms? 7ms?) will drown in the time it takes to make a network call.
https://making.pusher.com/golangs-real-time-gc-in-theory-and-practice/
lambdadmitry · 2017-06-14
I would argue that at least for client-server apps Erlang is faster. Here is why: in most cases the perceived performance of a server is constrained by maximum (or 99%, whatever) latency, not by throughput. Moreover, you can scale throughput horizontally, while scaling for latency is more or less impossible. Haskell's GC can give you horrendous pauses (see [1][2]), ruining perceived performance. Erlang, on the other hand, is thoroughly optimized for minimal latency.
TL;DR: "fast" isn't well-defined, and for a lot (or even most) applications "fast" is about latency, not throughput, and Erlang is "faster" in that sense.
[1] https://making.pusher.com/latency-working-set-ghc-gc-pick-two/
[2] they eventually abandoned Haskell for Go https://making.pusher.com/golangs-real-time-gc-in-theory-and-practice/
yawaramin · 2017-06-09
Oh, the range notation. It's a little convenience that can save a bit of typing here and there. Not a tremendously important feature, to be honest.
About multithreading, not sure what you mean but F# definitely has parallel collections in addition to its general async capability that lets you handle concurrency in a safe way. If you haven't already, check out the Hopac project (http://hopac.github.io/Hopac/Hopac.html , scroll down to the Description section).
About memory use, yes you create copies but at the same time immutability means you can have persistent data structures which share and thus save a lot of memory. Also, in general performance is good enough that you don't really have to worry about it, and when you do, you can always measure, profile, and see what's actually causing the memory pressure.
That said, it's true that functional programming languages have a different memory profile than imperative languages, and implementations which have been designed with this profile in mind perform really well. E.g. check out OCaml's performance in this GC pause benchmark: https://making.pusher.com/golangs-real-time-gc-in-theory-and-practice/
throwaway892238 · 2022-11-27
One to two lines of iptables limits connection attempts, making a brute force attack take thousands of years. No logging, no monitoring, no extra software.
If you only use SSH keys, no brute force attack will work anyway.
https://www.systutorials.com/how-to-use-iptables-to-limit-rates-new-ss… https://making.pusher.com/per-ip-rate-limiting-with-iptables/ https://stackoverflow.com/questions/18616246/iptables-limit-number-of-… https://blog.oshim.net/2009/06/iptables-to-rate-limit-incoming/ https://stackoverflow.com/questions/47775809/iptables-rate-limiting-co… http://blog.serverbuddies.com/using-iptables-to-rate-limit-incoming-co…
rotifer · 2020-02-09
Over the years I've collected various links on topics related to Haskell performance. I'll spare you the whole list, but here are a few that may be of some use.
Haskell Performance Patters - Johan Tibell (2012)
http://johantibell.com/files/haskell-performance-patterns.html#(1)
Performance (Haskell Wiki)
https://wiki.haskell.org/Performance
Detecting Space Leaks - Neil Mitchell (2015)
http://neilmitchell.blogspot.com/2015/09/detecting-space-leaks.html
The Haskell performance checklist - Chris Done, et. al. (2017 - 2019)
https://github.com/haskell-perf/checklist/blob/master/README.md
ThreadScope (Haskell Wiki)
https://wiki.haskell.org/ThreadScope
Top tips and tools for optimising Haskell - Will Sewell (2015)
https://making.pusher.com/top-tips-and-tools-for-optimising-haskell/