Top
Best
New

Posted by mpweiher 2 days ago

We saved $500k per year by rolling our own "S3"(engineering.nanit.com)
322 points | 250 commentspage 3
VladVladikoff 2 days ago|
I’m mostly just impressed that some janky baby monitor has racked up server fees on this scale. Amazing example of absolutely horrible engineering.

Also, just take an old phone from your drawer full of old phones, slap some free camera app on it, zip tie a car phone mount to the crib, and boom you have a free baby monitor.

bombcar 2 days ago||
If you don’t have fifty to a hundred dodgy PoE cameras from Alibaba tied to the crib do you even really love the baby?
vachina 2 days ago||
In a capitalist society it is intuitive to outsource every ounce of effort to somebody else.
danjc 2 days ago||
I'd it's processed in 2 seconds, why not just process it immediately in memory?
swiftcoder 2 days ago||
Because they are serverless, so there's currently no memory for it to be processed in at the point of upload
liqilin1567 2 days ago||
Maybe there are too many requests, so they have to offload the videos to s3.
dboreham 1 day ago||
That's not the reason. And furthermore any buffer/re-try mechanism should be done at the edge (on the camera).
miroljub 2 days ago||
Ah, these modern babies. They can't even sleep without being spied and recorded 24/7.

I'm glad both me and my kind grew up in different times.

Today's kids will never in their lives know what freedom is, and we are guilty we made such dystopian societies a reality.

lpa22 2 days ago||
If anyone here uses the Nanit app in the background of their phones, it absolutely destroys battery life.

I got a new phone because I thought my battery was cooked, but turns out it was just the app.

mring33621 1 day ago|
while (true) { Thread.sleep(300L); checkIsSubscriptionCurrent(); },

probably

hk1337 2 days ago||
I have always understood S3 is just HDFS with some extra features? So, if you were going to roll your own S3, then you’d stand up an HDFS cluster.
ghm2180 1 day ago||
Actually why(just) RAM? Why not have an append only storage to the local disk? WALs are quite fast.
0xbadcafebee 2 days ago||
Their architecture is internet bandwidth heavy and storage heavy; these are some of the most expensive things in AWS. You probably want to use a different provider for those things.

> It turns out that when AWS says an instance can do “Up to 12.5 Gbps”, that’s burstable networking backed by credits; when you’re below the baseline, you accrue credits and can burst for short periods.

Yes, AWS has a burst rating and a sustained/baseline rating for both EBS types as well as instance types. Use https://instances.vantage.sh/ (and make sure you choose specific columns) to compare specific criteria and then export as a CSV to find the lowest price that matches your performance/feature/platform criteria. Design to the baseline if you need guaranteed performance. Do sustained performance testing.

> When we Terminated connections idle >10 minutes, memory dropped by ~1 GB immediately; confirming the leak was from dangling sockets. Fix: make sockets short-lived and enforce time limits.

We used to do that with Apache 20 years ago. Config option forces a forked subchild to exit after N requests to avoid the inevitable memory leaks. AKA the Windows 95 garbage collector (a reboot a day keeps the slowness at bay).

FWIW, if the business feasibility of your architecture depends on custom stuff, performance enhancements, etc, you will find that you eventually have harder and harder problems to solve to keep your business functioning. It's more reliable to waste money on a solution that is brainless, than invest human ingenuity/technical mastery in a solution that is frugal.

dilyevsky 2 days ago|
They're very ingest heavy compared to how much of it is actually streamed out and to a very small/local audience so probably don't even need a cdn. And ingest on aws is free.

On the other hand, S3 is kind of ridiculously expensive compared to even more expensive on-prem options like a PureStorage SSDs array. With spindles on Ceph you can probably get quite a bit lower than AWS's 2c/Gig/mo. Or you can just use R2 with colocated servers for ingest.

bryanrasmussen 2 days ago||
they don't seem to have factored in the cost of doing this, so not sure what their actual saving was although it was probably substantial.
Brian_K_White 2 days ago||
unnecessary cloud subscription service abjures unnecessary cloud subscription service
NetOpWibby 2 days ago|
Cloudflare R2 solves this
More comments...