News for hackers. Stuff that matters.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @08:08AM (#33518564)
Hey cool, this is my project. Happy to answer questions.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by CommitSyn on Tuesday November 08, 2022 @08:21AM (#33518648)
Neat project. Where does the funding come from?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @08:36AM (#33518770)
It's quite cheap to run. It's just one small EC2 instance, and it's usually idling around a load average of 0.1 (though right now it's at 1, hehe). It costs me about $24/month. The Apple developer license costs $100 per year, so it's ~$400/year. As of recently, that's entirely covered by donations.

I am incredibly humbled by the sponsorships. I would have never thought ntfy would take off like that. I love open source and I promise it'll always be free and open (as long as I can reasonably fight of the abusers).

If you'd like to help me out me, you can donate via GitHub Sponsors: https://github.com/sponsors/binwiederhier

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by jacooper on Tuesday November 08, 2022 @09:25AM (#33519260)
If you would like to lower the cost more, I think switching to a cheaper cloud service like Linode or Hetzner would be the way to go.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by methyl on Tuesday November 08, 2022 @09:39AM (#33519434)
I'm not sure if it's worth going any lower than $24/month
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by Bluecobra on Tuesday November 08, 2022 @09:47AM (#33519524)
If I were to run my own personal instance of this that cost would be quite high. A free Oracle Cloud VM or $5 Digital Ocean droplet would be the way I go.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by SteveNuts on Tuesday November 08, 2022 @10:09AM (#33519796)
A free Oracle Cloud VM still costs you your soul, in perpetuity.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by recuter on Tuesday November 08, 2022 @11:29AM (#33520820)
That can't be right, some of us have worked for IBM and no longer have souls.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by TeMPOraL on Tuesday November 08, 2022 @12:13PM (#33521430)
IBM and Oracle have a soul-sharing deal signed.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by vasco on Wednesday November 09, 2022 @01:49AM (#33528247)
They went to court over it and depending on the number of CPUs you use you might be forced to have one or two kids to pay the extra souls.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by TeMPOraL on Wednesday November 09, 2022 @05:20AM (#33529492)
Yeah, I think that "or two" in "one or two kids" is still being litigated. My reading is that it'll stay in litigation indefinitely, as this is the price both companies agreed to pay when they decided to retain lawyers from Hell itself.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by hamburglar on Tuesday November 08, 2022 @11:02AM (#33520456)
Well, of course. “$24 per month seems high for running my own personal instance that’s going to do a handful of notifications daily” vs “$24 per month seems high for running a public service that could very easily need to be scaled up quickly” are two very different statements.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by YetAnotherNick on Tuesday November 08, 2022 @01:16PM (#33522247)
If I go by $50/hour salary on average for developer, if someone saves 20 minutes per month on average using AWS, it is worth it.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by conductr on Tuesday November 08, 2022 @02:18PM (#33523066)
Except where worth it in dollars < worth it in hassle
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by selcuka on Tuesday November 08, 2022 @05:55PM (#33525428)
If it's a single EC2 instance and not using any other AWS services, I fail to see the difference between Hetzner, DigitalOcean or AWS.

That being said, it's probably not worth migrating to another provider at this point.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by YetAnotherNick on Wednesday November 09, 2022 @07:12AM (#33530429)
I only have experience with Digital ocean and AWS. AWS free support is definitely much better than Digital Ocean. Also Digital Ocean is more quicker to delete your data than AWS in case of billing issue or anything.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by abnercoimbre on Tuesday November 08, 2022 @02:25PM (#33523131)
Would the $5 droplet scale (and charge appropriately) if their specified bandwidth is exceeded?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by jacooper on Tuesday November 08, 2022 @11:00AM (#33520423)
I mean from 24 to 10 is a big difference.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by webmobdev on Tuesday November 08, 2022 @09:34AM (#33519364)
You can probably count down server cost by half. Have you tried with lower resources or have figured out a minimum requirement for the server? As an experiment I suggest - https://tinykvm.com/ - with FreeBSD or OpenBSD (Linux doesn't really do well with small amount of RAM).
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by timtom39 on Tuesday November 08, 2022 @09:59AM (#33519686)
Just gave the developer $50 so he doesn't need to reduce monthly costs. I like the service running well.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @10:13AM (#33519842)
Much appreciated my friend. I honestly didn't opt for the cheapest server because I wanted it to run well. I don't want to constantly fight for resources or worry about it. It was supposed to be fast and be able to handle traffic well.

And it is. It's not falling apart from the HN traffic and it has a lot of head room. Plus. It's doing 400k messages a day already easily.

Anyway. Thank you so much for your generosity. I am humbled and thankful for your support.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by conductr on Tuesday November 08, 2022 @02:31PM (#33523186)
Your approach is great. It’s odd to see so many penny pinching comments here, the HN crowd usually skews the other way.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by chillfox on Tuesday November 08, 2022 @08:08PM (#33526404)
I think its because this is a hobby project and for a lot of people the cheaper a hobby project is the more they can keep running before the money runs out. It's also that for some people optimizing costs and making things run on as few resources as possible is fun.

But if you don't find it fun spending time performance optimizing to the extreme, and can afford it, then there's nothing quite like massively over-provisioning hardware. It makes a lot of performance and reliability problems go away.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by conductr on Wednesday November 09, 2022 @02:44PM (#33536842)
Probably some truth to all you said. I spend way more money on my hobbies.

For this creator, his hobby is well into the realm of "could productize some component", even if just creating derivatives of this for some commercial purpose. I'd much rather spend time on that than the optimization part. My thought is HN has skewed more technical than entrepreneur over the years and the folks who are into the optimizations are more vocal in the thread. Could also just be the cohort of HN that was attracted to this article. "Send push notifications to your phone" sounds pretty technical. Or, the tech recession is changing mood about money and I'm not in tech.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by webmobdev on Tuesday November 08, 2022 @11:04AM (#33520484)
That is nice of you and you've helped them to cover server costs for the next two months. Server optimisations can help them reduce the cost further.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @11:25AM (#33520754)
It is super nice, isn't it? I am so amazed how awesome people in the open source community are.

As for the scale question: The server is already tuned for scale: https://ntfy.sh/docs/config/#tuning-for-scale

If you have any more ideas of what nobs to turn, let me know.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by hamburglar on Tuesday November 08, 2022 @12:16PM (#33521474)
I appreciate the dogged pursuit of efficiency, but spending a lot of time optimizing for the current scale and getting costs from $24 per month to $10 per month (or whatever) is likely wasted time if this grows significantly. You have to be able to recognize there’s a lower bound where your costs are low enough it doesn’t matter and even saving 75% isn’t worth thr effort. The author has obviously drawn that line somewhere above $24 per month and that’s perfectly reasonable.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by webmobdev on Tuesday November 08, 2022 @04:30PM (#33524584)
That's a good point. I guess many of us were suggesting cheaper VPS because we assumed this is a new project, just launched. (Most inexperienced developers / start-ups tend to over provision). With current hosting technologies, it is quite easy to scale with need, with minimum downtime, so it makes sense to start with the minimum server requirement and then go for a powerful server as required. This give you valuable data on the bottlenecks (where you can do future optimizations), as you scale, while you temporarily fix the issue with more money (by requisitioning better servers) as you work out the cost-benefit analysis (as you did) of spending money on optimising vs server upgrade.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by hamburglar on Tuesday November 08, 2022 @11:07AM (#33520515)
This is super cool. If you don’t mind saying, how many connections do you tend to keep open at steady state?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @11:23AM (#33520729)
Here are some stats from last night showing the volume of messages:

   IPs: 9756
   Clients: 9980
   - Google Play: 2796
   - F-Droid: 5985
   - iOS: 794
   - curl: 62
   - other: 343
   Messages: 
   - Successful: 310076
   - Failed (rate limited): 104741
   - Failed (other): 6511

   Top publishers (* = limit exemption):
   22908 matrix.org*
   22352 matrix.gateway.unifiedpush.org*
   18286 up.schildi.chat*
   16134 192.124.x.x
   14056 matrix.envs.net*
   13376 108.35.x.x
   7794 114.132.x.x
   6035 112.78.x.x
   5432 88.99.x.x
   5366 138.201.x.x   
In terms of open connections, it varies, but right now it's 5k active connections. But there are many many self-hosters out there, and the people using Firebase (no "instant delivery") are also not counted in that.

You can subscribe to the stats above using the https://ntfy.sh/stats topic (old messages are only cached for 12h, so half the day it shows up as empty)

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by praveen9920 on Tuesday November 08, 2022 @02:29PM (#33523170)
Watch out for data transfer costs on aws after HN
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @02:59PM (#33523502)
Thanks. I'll keep an eye on it. I have a lot of rate limiting in place, but for static resources it could probably be tighter.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by ta988 on Tuesday November 08, 2022 @08:16PM (#33526476)
Thanks this is really nice. Impressive to see that f-droid is that high!
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by Donckele on Wednesday November 09, 2022 @04:28AM (#33529139)
Hey! nice idea and software. With the costs you mention how many notifications can you send? There must be a limit right?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by siculars on Wednesday November 09, 2022 @10:00AM (#33532494)
I love your work and admire your approach. But you should recognize a void will emerge and void get filled. Someone (probably reading this thread) will clone your idea and make it a supported for pay service.

It wont be me. But some enterprising engineer/pm/group who was recently laid off in this downturn will probably make a go of it.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by CameronNemo on Tuesday November 08, 2022 @10:48AM (#33520262)
Have you thought about integrating with Matrix in any way? I.E. curl ntfy.sh/matrix and put the matrix room id in the post payload. The user would have to invite your ntfy.sh matrix user to the room, and it would not offer encryption, but it might add value for use cases where you want to send to a team or the user wants their notifications in the same place.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @01:43PM (#33522637)
It is integrated with Matrix through UnifiedPush (https://unifiedpush.org/). Many people use it as a distributor to deliver Matrix messages. In fact, matrix.org is publisher #1 for the ntfy.sh instance. See stats here: https://news.ycombinator.com/item?id=33520729
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by marcus_cemes on Tuesday November 08, 2022 @10:50AM (#33520287)
From the repository that I found, it seems that you wrote the backend in Go. How did it hold up? Any lessons learned?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @01:50PM (#33522708)
No real lessons learned. I like Go, and I like that it lets me do no-fuzz-straight-to-the-point development. The single Go binary and server is handling the traffic just fine, and the architecture is simple and easy to extend.

I am suffering a little right now while I try to add E2E encryption, because I structured the handlePublish logic awkwardly. But other than that there have been no surprises.

Sorry that's such a boring answer.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by mugivarra69 on Tuesday November 08, 2022 @10:54AM (#33520341)
verynice, thanks for making
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by killthebuddha on Tuesday November 08, 2022 @12:18PM (#33521497)
Look for an email from [email protected] :) I'm building https://github.com/relaycc/receiver, and we're hiring.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @01:47PM (#33522687)
Much appreciated! I'll check it out and will reach out (likely tomorrow, busy day).
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by Maxburn on Tuesday November 08, 2022 @12:19PM (#33521500)
What does your reliability look like? Obviously no SLA but what can we really expect? Pay tier available for HA?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @01:47PM (#33522683)
https://ntfy.sh/docs/faq/#what-are-the-uptime-guarantees

I guarantee for nothing, since this is a spare time project. That said, I have had zero outages in 11 months, see https://ntfy.statuspage.io/

When it outgrows the single EC2 instance, I'll likely start building some distributed thingy to spread the load and do some HA things (sounds like fun). Probably just a load balancer and 2-3 instances with a rqlite backend instead of SQLite, nothing too fancy.

Right now that's not necessary. As you can see, it handles traffic just fine for now.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by otoolep on Tuesday November 08, 2022 @02:01PM (#33522836)
rqlite[1] author here, happy to answer any questions about it if it helps.

rqlite will give you HA, but won't help with load (rqlite replicates for reliability, not for write performance). But I like to think the it'll give you solid -- and simple to use -- HA. Replicated just replaced their use of Postgres with rqlite for this reason[2].

[1] https://github.com/rqlite/rqlite

[2] https://www.replicated.com/blog/app-manager-with-rqlite/

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @02:57PM (#33523480)
I love the internet. Random people meet in so many places. rqlite is awesome. Fantastic project.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by rsanaie on Tuesday November 08, 2022 @05:06PM (#33524963)
Start providing it (reliability/HA) and turn it into an actual business :-) It'd be a lot more fun than getting a principle position
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by VWWHFSfQ on Tuesday November 08, 2022 @06:07PM (#33525516)
As an engineer that also builds fun things that a lot of people use:

> turn it into an actual business :-) It'd be a lot more fun

Not only could it _not_ be more fun, but it might actually suck all the existing fun out of it completely. But the OP will know better about that!

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by Maxburn on Tuesday November 08, 2022 @08:31PM (#33526602)
Very true. But at least they might make some money from something of their choosing on their own terms. That can’t be too bad.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by niemandhier on Wednesday November 09, 2022 @05:19AM (#33529490)
The lib author seems to be German. Just an observation I made in the past: Some of the brightest German programmers I have ever met happily take 9-5 Jobs and rather do their project ideas as as hobbies. Might be a cultural thing?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Wednesday November 09, 2022 @06:10AM (#33529836)
I love your username: We seem to be opposites ;-)

As for your hypothesis: I can only speak for myself, but I just don't want to ruin my hobby by monetizing it. Plus, I've spent enough time with the community to know that as soon as money gets involved, people are suddenly not so kind anymore. I just like it more when people are kind and polite to each other and treat each other with respect...

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by dested on Tuesday November 08, 2022 @12:38PM (#33521763)
Yesssss, I have been looking for this type of service forever. I'm excited
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by wilshiredetroit on Tuesday November 08, 2022 @12:53PM (#33521955)
P.S. congratulations on the Baby!
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by willyyr on Tuesday November 08, 2022 @01:07PM (#33522120)
Thank you for creating this. I was just looking for something like that to send notifications to my mobile without setting this all up and deploying my own app to the store. Using ntfy now :)
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by tubs on Tuesday November 08, 2022 @01:31PM (#33522483)
How were you a principal engineer with 5 years experience and a senior principle with 7? Genuinely curious.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by hnarn on Tuesday November 08, 2022 @01:41PM (#33522610)
Because titles don’t tell you anything, they are decided by the organization you work in for any number of reasons.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by josegonzalez on Tuesday November 08, 2022 @01:36PM (#33522536)
Not knowing anything about the engineer in question, no two people's experience over a given period of time is equivalent. Additionally, levels differ wildly at different organizations.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by kaczordon on Tuesday November 08, 2022 @02:21PM (#33523091)
Time spent doing a job != skill. Once you hit a certain threshold of course.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by mongrelion on Tuesday November 08, 2022 @05:08PM (#33524995)
Congratulations. It seems like your project is well received in the community.

Could you elaborate on how this differs from gotify?

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by syedmsawaid on Tuesday November 08, 2022 @07:24PM (#33526087)
How can one integrate it into his own android app?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @08:15PM (#33526461)
To publish, just PUT/POST via your favorite HTTP library, or publish via intent (https://ntfy.sh/docs/subscribe/phone/#automation-apps).

And to subscribe, either use UnifiedPush (https://unifiedpush.org/), or use intents (see link above). Or, implement your own foreground service with WebSockets (just like the ntfy app does).

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by adamddev1 on Wednesday November 09, 2022 @12:48AM (#33527919)
I absolutely love this, and my mind's already buzzing with a bunch of ways I can use it. I love the simplicity, the docs, the pleasant experience of understanding and getting it running. (In like 10 seconds!) No logins, no user permissions management, no API keys and complicated auth creds, just a topic/password. So cool. I think it's cool for every once and awhile to push back against the trends for complication/over-engineering even if just to remind us of how simple/straightforward software can really be.

You've made a beautiful piece of software for your own enjoyment and the benefit of others. It is just what it needs to be. Bravo. In a world where projects get massively complicated and pumped full of VC funding, may efforts like this live on.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by tristanbvk on Wednesday November 09, 2022 @03:52PM (#33537668)
One really cool use I am making use of is that I am building an IRC not that interacts with Gitea webhooks.

I decided to add Ntfy.sh support today just because it was so goddamn easy. Thanks for the cool service!

Now whenever new pull requests, issues or commits are made I get a ding on my phone!