News for hackers. Stuff that matters.
Re:Txt.fyi by beschizza on Thursday February 23, 2017 @03:50PM (#13717652)
Hi! Creator here. It's getting a good kicking right now so I took down the "new post" page. Everyone's fyis are still live and well.

I wanted to make a publishing widget so minimal it would operate without fuss on a $5 digitalocean plan, and I think I almost succeeded!

Re:Txt.fyi by sebringj on Thursday February 23, 2017 @04:47PM (#13718123)
Hi, nice idea! It went down though so I was thinking maybe you could build it strong but on the cheap too without needing a database and very little coding.

It starts with this premise: https://aws.amazon.com/articles/1434/

There is an approach I've used for years and my site never goes down with high traffic and I didn't use load balancers or anything fancy. Its very cheap to run and maintain.

1) Use Amazon S3 and Cloud Front for all your web pages, including your web app as well along with storing anything such as file uploads, etc.

2) Have a simple cheap $5 Digital Ocean Droplet (Node or Go) used only as an API.

3) JavaScript is hosted on your website front end that upon save for content then hits your API server just once to get a Just-In-Time signing request that authorizes the web browser to make an upload directly to S3 temporarily and signed to a specific namespace/bucket. This type of traffic happens very less than say viewing a web page along with it taking up very little processing and bandwidth so you really don't need to scale this.

4) The web browser's javascript literally creates the entire html page and uploads it directly to S3.

You can easily do image uploads as well or video too using this method and use the just-in-time signing method for those too.

Yes it is not secure if there is no signup etc but you can do crypto.generateRandom to put people in specific namespace path then show their URL after, controlling limited permissions and the location of where things are saved from your cheap API server.

Here's my little repo for signing to demonstrate this -> https://github.com/sebringj/siggy

Just a thought.

Re:Txt.fyi by qbaqbaqba on Friday February 24, 2017 @08:57AM (#13723656)
You may also use AWS Lambda and AWS API Gateway.
Re:Txt.fyi by sebringj on Friday February 24, 2017 @01:54PM (#13726498)
Sure you could. The funny thing is, I've had this product on the market using this very concept of JIT signing, using the browser (and apps) to do all the work, didn't really put any effort into, only used for my clients as a CMS-as-a-service or CMSSAAS WTF? called kitgui.com, been on some department store brands using it for ecommece sites that i've put as a consequence of needing this on multiple backend platforms. Any hoo, never goes down, never had to do jack shit scaling or worry about it but I've completely neglected it so it looks like 2010 crap themes and diy web standards. Anybody want to partner up on it and make a bad-ass json cms that spreads to all devices? I'll gladly divvy % on current revenue.
Re:Txt.fyi by iso-8859-1 on Friday February 24, 2017 @09:00AM (#13723678)
You could maybe convince me that this is good if you cared enough about it to host an instance yourself...
Re:Txt.fyi by sebringj on Friday February 24, 2017 @11:28AM (#13725050)
Alas, only doing this for karma and a false sense of belonging, beyond that, I like money.
Re:Txt.fyi by firefoxd on Thursday February 23, 2017 @04:16PM (#13717856)
Hello creator. You can handle the traffic and db insert on a cheap digital ocean plan.[1]

My server purred with hn traffic.

[1]: https://idiallo.com/blog/handling-1-million-web-request

Re:Txt.fyi by philtr on Thursday February 23, 2017 @04:55PM (#13718188)
For the record, firefoxd's static assets were offloaded to another server for an additional $10/month. $15/month is still not bad, but I feel like this comment is a bit misleading.
Re:Txt.fyi by sebringj on Friday February 24, 2017 @12:08AM (#13721178)
You reminded me of Nepter on Adventure Time.
Re:Txt.fyi by mozumder on Thursday February 23, 2017 @04:16PM (#13717851)
How many requests-per-second are you getting right now?

What's the CPU utilization like with this level of usage?

What's the back-end stack?

What's the normal latency like?

I'm just wondering why it would go down due to heavy traffic, when all it serves is basic text?

Re:Txt.fyi by tedmiston on Thursday February 23, 2017 @10:40PM (#13720744)
> Write something, hit publish, and it's live.

Live for how long though?

Too many publishing platforms sunrise and sunset. To use one that's not self-hosted, I really think one either needs to (1) charge money, and/or (2) offer guarantees like Posthaven or Svbtle, if you want users to publish good content on your platform.

Re:Txt.fyi by mst on Friday February 24, 2017 @07:33AM (#13723013)
Write something, hit publish, enter resulting URL into archive.org?

I'd worry that's an abuse of archive.org except apparently their policy is basically "the crap is important too".

Re:Txt.fyi by tedmiston on Friday February 24, 2017 @02:12PM (#13726684)
Even archive.org is dependent on donations [1].

[1]: https://archive.org/donate/

Re:Txt.fyi by mst on Friday February 24, 2017 @02:58PM (#13727220)
Well, yes. But it has already proven staying power that puts it in rather a different class to "somebody's neat side project" in terms of expectation of survival.
Re:Txt.fyi by sundvor on Thursday February 23, 2017 @06:45PM (#13719087)
With the coverage you're getting, I'd expect traffic to go up indeed! Great work :)

http://www.theverge.com/2017/2/23/14712352/txt-fyi-minimalis...

Re:Txt.fyi by ryan-allen on Thursday February 23, 2017 @08:11PM (#13719872)
Hey! The about says 'no databases', but how do you store the text then?
Re:Txt.fyi by the_arun on Thursday February 23, 2017 @09:09PM (#13720245)
Storing in S3 should just work. Isn't it?
Re:Txt.fyi by bttf on Thursday February 23, 2017 @06:13PM (#13718812)
I'd imagine for the time being you could use DO's resizing features to vertically scale your droplet to handle the load. Then at a later point, horizontally scale.
Re:Txt.fyi by rachkovsky on Friday February 24, 2017 @09:14AM (#13723791)
Cool idea. You need favicon, so it looks nicer when bookmarked or saved in dashboard sites, like zeerka.com
Re:Txt.fyi by KirinDave on Thursday February 23, 2017 @04:35PM (#13718027)
I'm really curious what ended up being the thing that took you down.
Re:Txt.fyi by beschizza on Thursday February 23, 2017 @04:39PM (#13718063)
The bottom line is I don't know beyond memory. I'm utterly amateur and have enlisted the help of another Hacker News reader!
Re:Txt.fyi by toyg on Thursday February 23, 2017 @07:30PM (#13719497)
"Utterly amateur" => runs boingboing.net.

No need for modesty.

Re:Txt.fyi by jasonjayr on Thursday February 23, 2017 @09:23PM (#13720319)
Rob doesn't technically "run" boingboing -- they Have Ken Snider sysadmin'ing it ....
Re:Txt.fyi by beschizza on Thursday February 23, 2017 @09:47PM (#13720465)
Yes, I'm just editorial (and until recently design). Ken is our sysadmin and, as it happens, got txt.fyi back on its feet today when HN blew it down! He's brilliant!
Re:Txt.fyi by KirinDave on Friday February 24, 2017 @12:56AM (#13721404)
So... what was wrong? :D
Re:Txt.fyi by warent on Thursday February 23, 2017 @05:54PM (#13718662)
Hey, consider Google Cloud as a solution, super low cost and scales automagically, load balances etc.