News for hackers. Stuff that matters.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by Charlieholtz on Thursday February 10, 2022 @07:10PM (#30294839)
I built a satirical social network called shlinkedin. It started as a way for me to learn elixir and make fun of thought leadership with my roommate, and has gradually gotten bigger. It’s all open source and a ton of fun to work on. Everyone is an alter ego (think Beff Jezos or Office Spider), and it’s hilarious to see how much people commit to the characters they create. And I can’t say enough good things about working with elixir / phoenix liveview. Definitely a steep learning curve for me (I’d never used a functional language before), but payoff is huge.

https://www.shlinkedin.com

Re:Ask HN: What is your “I don't care if this succeeds” proj... by jvanderbot on Thursday February 10, 2022 @07:19PM (#30294946)
HN hug of death. And well deserved, I had a great time with this one.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by wsinks on Thursday February 10, 2022 @07:38PM (#30295151)
I was SO CLOSE to finishing the tale about the Officer Spider who ended up free his former employee of his biggest constraint, TIME, but... then it crashed. I really want to finish that story!
Re:Ask HN: What is your “I don't care if this succeeds” proj... by Charlieholtz on Thursday February 10, 2022 @07:39PM (#30295159)
Damn! Sorry about that. I’m upping the servers right now. Can’t wait to hear the end of this inspirational tale :)
Re:Ask HN: What is your “I don't care if this succeeds” proj... by jtmarmon on Thursday February 10, 2022 @09:49PM (#30296244)
Should've built it in elixir, I heard it's webscale
Re:Ask HN: What is your “I don't care if this succeeds” proj... by josefrichter on Friday February 11, 2022 @06:17AM (#30300065)
I’d be curious to hear what went wrong and took the server down. Elixir apps usually handle these traffic spikes just fine.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by 0wx on Thursday February 10, 2022 @08:10PM (#30295447)
That's sound interesting, I wish the website up soon otherwise I'll just forget and moving on with my day.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by melony on Friday February 11, 2022 @12:13AM (#30297279)
Isn't elixir supposed to scale better than this?
Re:Ask HN: What is your “I don't care if this succeeds” proj... by trutannus on Friday February 11, 2022 @12:24AM (#30297372)
Elixir probably isn't the bottleneck. The VPS instance itself, and whatever server they're using there, probably bit the dust.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by Charlieholtz on Friday February 11, 2022 @09:48AM (#30302062)
yeah so I'm seeing a ton of "(Postgrex.Error) FATAL 53300 (too_many_connections) remaining connection slots are reserved for non-replication superuser connections", which I'm guessing means the pool size is too small? Although I've tried upping that, CPU, and memory, and none have seemed to fix it. My devops skills still aren't great so if anyone has any ideas on how to help, let me know!

This might be a good opportunity to change the server to try out fly.io

Re:Ask HN: What is your “I don't care if this succeeds” proj... by dbetteridge on Friday February 11, 2022 @05:13PM (#30307646)
Pgbouncer is your friend for postgres dB's with lots of client connections.

Larger pool size only helps if they're freed up quicker than they are used.

Re:Ask HN: What is your “I don't care if this succeeds” proj... by LecroJS on Friday February 11, 2022 @06:17PM (#30308172)
Would you mind elaborating on the second point? Is this unique to larger pools? My inclination is that this would be true for pools of all sizes
Re:Ask HN: What is your “I don't care if this succeeds” proj... by psd1 on Saturday February 12, 2022 @07:11AM (#30312193)
I suspect GP meant: increasing pool size is only prolonging the inevitable

I've also observed on other DBs that you can increase the connection pool but it shifts the problem to other resources.

Re:Ask HN: What is your “I don't care if this succeeds” proj... by LecroJS on Saturday February 12, 2022 @08:01AM (#30312442)
Thanks for the clarification. Makes sense
Re:Ask HN: What is your “I don't care if this succeeds” proj... by tormeh on Friday February 11, 2022 @08:38AM (#30301298)
BEAM is not fast. You're probably going to get better performance with Node.js. It is however really really low-latency. But that doesn't help with handling load. Anyway, even so I'd guess bandwidth or the database is the issue.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by romanbaron on Tuesday February 15, 2022 @10:18AM (#30347531)
BEAM is not fast when it comes to CPU intensive workloads. "Better performance" has many dimensions, in many (most?) scenarios of web serving the bottleneck is latency to other services (i.e. Postgres) and not the processing of the web server, like you suspect in this case as well.

BEAM/Erlang/Elixir's main advantage IMHO is parallelism and "cheap" concurrency that's easy to wrap one's head around. It reuses multiple cores, and processes (lightweight threads) are both cheap (smaller stack size, per-process GC) and easy to get right (due to immutability of data structures and supervision). Also you'll get less spiky latency even under high load.

Node.js main advantages are the breadth of the library ecosystem, industry familiarity and its JIT compiler (if used correctly). At the cost of more setup one can also run an instance per core if they care for parallelism.

So I'd suggest that with BEAM he'd get quite a good performance both in terms of developer time and in serving many (network bound) requests on a multicore machine.

Re:Ask HN: What is your “I don't care if this succeeds” proj... by exikyut on Friday February 11, 2022 @09:10AM (#30301649)
> BEAM is not fast

> It is however really really low latency

I've been interested in Erlang for a while, and reading this is intriguing. Taken literally the above makes no sense :) but it also kind of... does, sort of, and I would like to understand how this works.

Re:Ask HN: What is your “I don't care if this succeeds” proj... by tormeh on Friday February 11, 2022 @09:34AM (#30301916)
There's often a tradeoff between latency and throughput. Think GC algorithms or IO buffers. The Erlang project has historically chosen the far left end of this spectrum. They also haven't cared about numerical performance at all, delegating that to C code.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by exikyut on Friday February 11, 2022 @10:35AM (#30302598)
Ooooh, burst response as opposed to flat-out super tight hot loops.

That honestly makes a lot of sense. Thanks!

Re:Ask HN: What is your “I don't care if this succeeds” proj... by meowtimemania on Friday February 11, 2022 @04:10AM (#30299098)
Probably too many queries to the database.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by nicbou on Friday February 11, 2022 @03:17AM (#30298592)
I've seen it before. It's hilarious
Re:Ask HN: What is your “I don't care if this succeeds” proj... by zlib on Friday February 11, 2022 @09:57AM (#30302172)
I'm also starting to learn elixir/phoenix liveview and seeing shlinkedin's code is a great help for figuring out how you've done certain things, thanks!
Re:Ask HN: What is your “I don't care if this succeeds” proj... by gcampos on Friday February 11, 2022 @02:28AM (#30298186)
Love shlinkedin and I think you have a shoot of making it successful. Not "the next Google" kind of successful, but could be at least a life style business.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by sizzle on Friday February 11, 2022 @01:57AM (#30297956)
Love the hilarious emoji post options: chili, glass of milk, slap
Re:Ask HN: What is your “I don't care if this succeeds” proj... by WCityMike on Saturday February 12, 2022 @09:11AM (#30312953)
Wi-fi enabled hot sauce. I did not know so much satire could be packed into four words. That's satire-rich semantics, right there. SatiricWeb3.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by shrubby on Friday February 11, 2022 @10:01AM (#30302210)
Thanks, had a blast there for a while. Nice alternative to trolling in LinkedIn, which I've done as well. A crapton of stiffies in the latter one.
Re:Ask HN: What is your “I don't care if this succeeds” proj... by wswoodruff on Monday February 14, 2022 @08:35PM (#30341409)
Hopefully they'll switch to Node soon so I can help too
Re:Ask HN: What is your “I don't care if this succeeds” proj... by jawmes9 on Saturday February 12, 2022 @12:10PM (#30314329)
So excellent, happy to see you're open to contributions too!
Re:Ask HN: What is your “I don't care if this succeeds” proj... by mocmoc on Friday February 11, 2022 @03:02AM (#30298455)
I love it and the people that I have share it with loved too
Re:Ask HN: What is your “I don't care if this succeeds” proj... by jacob_rezi on Friday February 11, 2022 @12:04AM (#30297217)
Shlinkedin is the best. Still yet to use our software tho :(
Re:Ask HN: What is your “I don't care if this succeeds” proj... by wilsonjholmes on Saturday February 12, 2022 @08:04AM (#30312472)
This is awesome!
Re:Ask HN: What is your “I don't care if this succeeds” proj... by throwawayHN378 on Friday February 11, 2022 @07:16AM (#30300511)
Aaaaaaaand you’re sued