HNHacker News
TopNewBestAskShowJobs

mark242

2,159 karma · joined May 12, 2011

https://markbeeson.net

[ my public key: https://keybase.io/mark242; my proof: https://keybase.io/mark242/sigs/nJ2IAh2nEXLlnolJOnWEDYJT48SvfBE0w9dqQoQ4d0Q ]

submissionscomments
mark242··on Chrome Autofill doesn't respect autocomplete=off
Two-factor auth selecting focus and suddenly seeing a dropdown of old, worthless 6-digit numbers comes to mind.
mark242··on A serverless email server on AWS using S3 and SES
Assuming a default message size of ~10kbytes the SES pricing is about $6 for the connections plus the chunks. Your lambda pricing is negligible and the S3 pricing gets you another dollar or so.

But you're operating at the wrong scale-- 30k messages to a domain can happen in an hour by a spammer doing a directory attack. The point is that this solution is extremely open to abuse that happens all day every day over SMTP. Without a fixed-cost firewall to reject messages and only allow clean messages through to this solution, you are going to have escalating costs.

mark242··on A serverless email server on AWS using S3 and SES
Yes. The days of running a legitimate MTA at home are unfortunately over. Many US-based consumer ISPs block port 25 entirely except for connections to their own MTAs, but for the ones who don't, very very many of those IP addresses wind up on policy-based blacklists -- eg "this network is a bunch of consumer addresses and should never be connecting directly to an MTA"
mark242··on A serverless email server on AWS using S3 and SES
When the documentation says "this may cost you money" what they really mean is "this will cost you a lot of money the moment your email address gets onto any spam lists". The number of lambda invocations will go through the roof, and even if you're able to catch 90% of the spam before dumping messages into S3, the cost of putting a message into a bucket will make your bill skyrocket periodically as spammers temporarily find their way past SES's built-in filters, which happens every so often.
mark242··on A serverless email server on AWS using S3 and SES
> I find IP based mail blacklist services such as BRBL obsolete and possibly harmful. Now that we have domain verification services like DKIM SPF etc. Blacklist the domain.

SPF and DKIM require opt-in by the sending domain, of which the majority of non-commercial non-US outgoing MTAs do not do. IP-based blocklists, including Spamhaus PSBL Mailspike etc, are all valuable to catch IP addresses that should not be directly connecting to your MTA. I agree that signing up for an outgoing MTA service such as Sendgrid makes some IP-based checks obsolete but that's not where the majority of spam is coming from. Botnets continue to be the number one source of junk email and will likely continue as we add more and more insecure doorbells, garage openers, refrigerators, etc, to our home networks.

mark242··on Technologies could hold back business travel
If your customers are WFH, you aren't visiting them to make a sale.
mark242··on The Framework Laptop
Very disconcerting to launch a laptop without any mention of battery life.
mark242··on Unbroken Enigma Message
Enoch Root is a pretty interesting guy. You should read the Baroque Cycle series to get a little bit of his backstory.
mark242··on The database servers powering Let's Encrypt
Stopping by to say, 9ms API response time is just ridiculously quick. You're starting to run into the laws of physics and client proximity to the datacenter where those machines live. That's a pretty amazing feat. I would assume the next step for scaling is getting those read replicas deployed across the world in order to cut down on RTT.
mark242··on Self-Hosting Still Pays
Someone who is doing a cost comparison of running Wordpress and forums has absolutely no idea about any of those mentioned services and the power they bring.

SQS is just such an amazing tool in a developer's toolkit that is one of those transformational pieces to how you write software. Combine that with Lambda to consume messages, S3 as your object storage, and Dynamo as your state management, and you unlock the capability of a single engineer to write applications that would have taken teams and teams of people only a few years ago.

Again, does this mean anything to the Wordpress crowd? Probably not. But the ability to bring a new project to market quickly and grow that project is no longer bottlenecked by how fast you can get on your phone to your colo provider on Saturday night.

mark242··on Self-Hosting Still Pays
I think the moral of the story is: if you have a predictable workload that fits within a smallish, stable infrastructure and you can make on-prem work, that's great, more power to you.

If you are treating cloud services as purely an apples-to-apples cost comparison then you've missed the point of deploying to (insert your favorite cloud provider here). What you get with cloud services is flexibility and speed. If the OP wants to undertake a new project that they have no idea of the resulting workload or popularity, they need to guess about the required underlying infrastructure. If you miss on your guess, you can either kill momentum for that new project, or you can wind up overprovisioning and paying way way too much on hardware.

I'm not sure how quickly their colo provider could spin up new hardware for this hypothetical new project, but you can assume it's not the dynamism that you get from deploying to an elastic cloud environment. Again, you're paying a premium on day-to-day costs in order to have this freedom to create and deploy. That's what cloud infrastructure is about.

To give an example -- I have a very-CPU-heavy workload that started its life out on prem. As more and more customers signed up, I would go through tiers of adding more hardware to a rack, where my overall margins looked like a sawtooth waveform when I would provision more hardware. I started out moving to EC2 and then finally to ECS/Fargate. If I want to spin up a new piece of functionality for my users, I don't need to provision any new hardware, set out any real new infrastructure, or do anything that you would consider prework in order to get that new functionality deployed. My margins are much much more predictable and I get faster time-to-market on feature development. That's what you're paying the premium for, that ability to just move faster.

mark242··on Amazon EC2 Mac Instances
CI/CD for iOS, MacOS, and React Native builds. Right now the pricing for Mac instances for builds via Github, Gitlab, Circle, etc are ludicrous. For a certain developer velocity, these instances will probably be much, much cheaper than running builds through the CI/CD SaaS providers.
mark242··on Tips for Performant TypeScript
The default eslint/prettier settings require return types for this very reason. Readability and not having to tab between files to figure out a return value is surprisingly helpful for your overall dev velocity.
mark242··on 1MB Club
Here's the disconnect, which is why these "webpages need to be slim!" sites tend to make me think they're greybeard nostalgia for an internet that doesn't really exist anymore.

Your 1mb webpage is approximately 60ms worth of Disney+ streaming.

Your 1mb webpage is approximately 1.7s worth of Zoom chat.

Your 1mb webpage is approximately 1.9s worth of Tiktok video.

Unless you are specifically targeting low-bandwidth users, you need to worry about product market fit long before you worry about slimming your js bundles down.

mark242··on Managing my personnal servers in 2020 with K3s
For those of you hitting ctrl-f "postfix": Postfix is very much not designed to run within a container. Unless you can absolutely 1000% guarantee that you will only ever have one instance of the postfix container running, you _will_ get data corruption and it is _very_ likely that you will lose email, because postfix does not support multiple instances sharing the same data/queue directory.

A ReplicaSet, as given in the OP's yaml, does not suffice here because it is not guaranteed that the failing pod (which triggers a new pod to start) doesn't come back to life. That will almost guarantee your postfix installation to break especially as one postfix instance starts cleaning up files possibly during the time period where another postfix instance hitting the same directory is trying to access them.

On edit: yes, Postfix 3.3 can be run as a container process. What I mean is running it within a standard container environment where you would expect multiple instances to run for failover etc.

mark242··on How HN crushed David Walsh's blog
tldr: The php process hit the max connections inside the database pool, which caused blocking within the php threads, which caused a thundering herd problem, and without correct tracing inside the wordpress php files the authors didn't know this and assumed that there wasn't enough caching on the front-end.

"at least 2 database-touching requests for every person reading the post" should never be a blocker for 2 requests per second unless you truly do not understand your application infrastructure at all.

on edit: The better solution here would be to figure out where the MySQL server was being put under load -- hint, it probably was 99% idle, because unless that sidebar file was making an unindexed query there's no way things would take 500ms -- and then realize that you need to bump up the number of database connections in your php pool to be MYSQL_MAX_CONNECTIONS so that php isn't blocked on obtaining a new connection. Problem solved.

mark242··on The Serverless Revolution Has Stalled
If you are not in the CDN business, why on earth would you want to do this?

This is my point-- I am not in the hosting business. I am in the application creation business. Every minute that I even have to think about modifying /etc/localtime in order to make sure that the instance is running in UTC is a minute I'm not being productive. Multiply that by those million little things that you have to do in order to keep even an ec2 instance running, and it's such a colossal waste of time and effort. Similarly, I am not in the database tuning business. I plan out my data relationships, create the required Dynamo table or tables, and I never need to worry about replication or backups or any of those ancillary tasks that keep me from being productive.

mark242··on The Serverless Revolution Has Stalled
Here's the beautiful thing about thinking serverless. "Are you really sure that it all re-ran?" Yes I am, because Dynamo streams or Kinesis streams guarantee message delivery. If my Lambda code has a bug in it, which yes sure that happens, I can as part of my exception catching, put that message into a dead letter queue and process it later or report on it. No polling, no querying, I know exactly what went wrong and when.

Meanwhile, I don't have to do things like /make sure the ETL process is running/ or /clear out a bunch of logs when a disk inadvertently fills up/ or any of those other stupid last-century compute problems. It's just a far, far easier way of thinking about application development.

mark242··on The Serverless Revolution Has Stalled
I have run AWS vs colo at scale. For the cost of precisely 1 engineer fully loaded, I can have 500TB of bandwidth per month, every month. Guess what, it isn't going to take just 1 engineer to maintain your homegrown worldwide CDN.

Does it make sense for FAANG to run their own datacenters? Yes of course. Does it make sense for you? No. This is what I don't get about arguments for running a bunch of VPSs-- for literally any environment that isn't thousands of engineers, it is more cost effective to let someone manage your underlying infrastructure for you, and any workload at that scale, you aren't contracting with some random bare metal hosting shop.

mark242··on The Serverless Revolution Has Stalled
Yes, this exactly. The fact that I can guarantee that my code is running, and have entire massive teams at Amazon whose literal job title is to keep my code running, it is such a freeing feeling. I might be able to delete rows from Dynamo from my code messing up, but Dynamo will never go offline.
mark242··on The Serverless Revolution Has Stalled
Because that "cheap dedicated server" isn't all that cheap. Just the documentation for backups on your Hetzner server is ridiculous. Why, in the 21st century, should I as an application developer ever have to worry about that?

Let's say that Hetzner server goes completely toast at 2am and you get a pingdom message. You log in, realize you have to restore from backup. You fire up a new instance, and go through your restore procedure, and everything works great. You're lucky to be offline for an hour.

I cannot even tell you what would happen if an underlying instance running a Lambda goes offline, because it never happens. But let's say that an underlying machine dies in us-east-1. Lambda just starts running more instances of your code on another underlying group of cpus, and you aren't offline.

mark242··on The Serverless Revolution Has Stalled
Here's why I love serverless.

I cannot tell you the number of times I have implemented "upload your photo and it'll get resized to (profile avatar size from design specs)". It's ridiculous, and it's one of those things that everyone burns time implementing their fun hook into Imagemagick. Now I have one lambda that gets pointed at a new record stream from an S3 bucket, and I'm done.

I cannot tell you the number of times I have implemented "when this user signs up, send them a welcome email." It's one of those things where you construct your email, point it at your MTA, do a ton of configuration, then it may work. Now I have one lambda that gets pointed at a new record stream from Dynamo, which calls SES, and I'm done.

I cannot tell you the number of times I have implemented "clear the Redis cache if a user changes their preferences". You write a clearUserCache hook into your DAO, or you paste it manually into your crud functions, and you always forget something, and six months down the line you start getting bug reports of people's zip code not updating, or something. Now I have one lambda that takes record streams from Dynamo, removes a key from Elasticache, and I'm done.

It's not that you couldn't do this before serverless, of course you could and you still can. It's that it makes that level of code reuse that much simpler. You have all of these helper infrastructure functions that you implement for every single project you work on, and reusing that glue code is so, so much easier in Lambda/GCF/AF/etc.

mark242··on City Map Generator – Create procedural American-style cities in the browser
Nitpick: I don't know of any American cities on the coast that have a road between housing and the sand. Certainly not a major road.
mark242··on Show HN: Straight2Spam – Send your email right to someone's spam folder
If you look at what gets copied to the clipboard, GTUBE is at the end of it.
mark242··on Amazon Elastic Container Service now supports Amazon EFS file systems
This is the single biggest blocker to running something like Postfix in ECS. This is a huge, huge win.
mark242··on An alternative to using Google Analytics on your website
Not sure who makes Plausible, but if the "live demo" is reflective of the actual product, it's sorely lacking. The reason that GA so popular is because of the free tier, sure, but also because GA 360, the really amazingly expensive version, has features that let you really get insights about your visitors.

Here's a popular question these days: "when can I stop supporting IE 11?" With GA, the answer comes in a couple of clicks; revenue generated sliced by browser version. I don't even see the revenue generated section of Plausible, or really any way to associate any metadata with custom events. GA gives you this functionality without any coding.

If you don't want to use GA, try something like Amplitude, which has a lot more data manipulation options than Plausible.

mark242··on BlurHash: Algorithm to generate compact representation of an image placeholder
the fact that our database engineer went "I'm not putting that much garbage in my database"!

This is really disingenuous-- a DBA should not be a gatekeeper of what gets put into a database. Storing 200 bytes of extra data per row costs you absolutely nothing. Even if you assume 100 million photos, that's 20GB of data. That's a little over $2 of EBS cost per month. Who cares.

mark242··on This Page is Designed to Last
I fundamentally agree with the principle -- that pages should be designed to survive a long time -- however the steps the author lays out I completely disagree with.

"The more libraries incorporated into the website, the more fragile it becomes" is just fundamentally untrue in a world where you're self-hosting all of your scripts.

"Prefer one page over several" is diametrically opposed to the hypertext model. Please don't do this.

"Stick with the 13 web safe fonts" assumes that operating systems won't change. There used to be 3 web safe fonts. Use whatever typography you want, so long as you self host the woff files.

"Eliminate the broken URL risk" by... signing up for two monitoring services? Why?

I think this list of suggestions does a great disservice to people who just want to be able to post their thoughts somewhere. There's an assumption here that you'll need to be technically capable in order to create a page "designed to last" and frankly that is not what the internet is about. Yes, Geocities went away. Yes, Twitter and Facebook and even HN will go away. But the answer sure as hell isn't "I teach my students to push websites to Heroku, and publish portfolios on Wix" because that is setting up technical gatekeeping that is completely unnecessary.

mark242··on Tesla Software Version 10.0
Get yourself a used Ford Focus Electric. The range is small, but it's the perfect commuter car and is the closest thing to an "analog" electric car you'll find. Ford took the high-end Titanium body and interior and grafted the electric drivetrain into it.
mark242··on Working with GitHub Actions
You should probably set up a custom Docker container to act as your "cached instance". If you're doing the same setup steps over and over for each build, and these setup steps are immutable, just throw them into a Dockerfile and create your own custom action environment.
← PreviousPage 4 of 12Next →