News for hackers. Stuff that matters.
Re:Moving my serverless project to Ruby on Rails by erikrothoff on Sunday November 15, 2020 @10:52AM (#25102067)
Curious what part of Rails you didn’t find scalable? Our Rails frontend servers run on cheap VMs that are easily scaled horizontally.
Re:Moving my serverless project to Ruby on Rails by jon-wood on Sunday November 15, 2020 @11:55AM (#25102582)
Rails is great if what you’ve got is read-mostly cachable content being served up. In an environment with high rates of incoming data, most of which can’t be reliably cached, things get more interesting and you start needing to scale horizontally a lot more and leaning on the database.
Re:Moving my serverless project to Ruby on Rails by awestroke on Sunday November 15, 2020 @11:02AM (#25102147)
Scaling horizontally is not cheap. A faster language needs fewer replicas.
Re:Moving my serverless project to Ruby on Rails by nitrogen on Sunday November 15, 2020 @11:35AM (#25102417)
Rails handled Black Friday and Cyber Monday traffic for an ecommerce company I used to work for just fine. If you are making money, it's worth the cost of 50 lowend VPSes autoscaled (we could have done with a lot less, too).

If we were using Java it would have taken us three times the people and four times as long to build the site, and we all would have been laid off.

Re:Moving my serverless project to Ruby on Rails by FpUser on Sunday November 15, 2020 @02:47PM (#25104131)
For rare events this concept works fine. For large sustained loads using more language/runtime could save a fortune.
Re:Moving my serverless project to Ruby on Rails by erikrothoff on Monday November 16, 2020 @03:55AM (#25109590)
Do you have a real world example? For example, what are you spending on a single app server? And how many RPS should it handle?
Re:Moving my serverless project to Ruby on Rails by marsdepinski on Sunday November 15, 2020 @01:34PM (#25103474)
Not if you hired better people.
Re:Moving my serverless project to Ruby on Rails by rualca on Sunday November 15, 2020 @01:05PM (#25103246)
> Rails handled Black Friday and Cyber Monday traffic for an ecommerce company I used to work for just fine.

That says nothing about the added cost of running inefficient services, which require additional nodes to serve the same requests and thus increase operational cost and also risk to perform the same service.

Re:Moving my serverless project to Ruby on Rails by erikrothoff on Sunday November 15, 2020 @11:09AM (#25102199)
Really? Our frontend servers handle 50 rps and cost $20 each and are nowhere near peak utilization. If anything ever needs scaling its the database. What level of traffic are you talking about?
Re:Moving my serverless project to Ruby on Rails by tutfbhuf on Sunday November 15, 2020 @11:39AM (#25102456)
For example a newspaper with customizable content, 1 petabyte (70% video) per month and avg. 2k request per second.
Re:Moving my serverless project to Ruby on Rails by erikrothoff on Sunday November 15, 2020 @11:51AM (#25102541)
I don’t want to second guess technical decisions I know nothing about but: no, Rails shouldn’t be streaming video. But 2k requests per second with mostly text content being shuffled around sounds absolutely doable with Rails. The cost benefit of easier development should definitely not be understated as well.

But that being said, the primary driver for tools should be what the developers know and ease of access finding developers who know this technology. If the city you work in mostly has PHP developers, PHP is a great choice. Similar for Java, Haskell, Lisp, etc. My point is that the tool ”Rails” definitely is adequate for this problem (minus streaming video...). Look at Shopify, Github or any other massive Rails app

Re:Moving my serverless project to Ruby on Rails by cambalache on Sunday November 15, 2020 @01:00PM (#25103213)
> I don’t want to second guess technical decisions I know nothing about but: no, Rails shouldn’t be streaming video.

Yeah, if you are serving video at that rate, there are plenty of CDNs to work with, why would you submit your app engine to that.

Re:Moving my serverless project to Ruby on Rails by kazinator on Monday November 16, 2020 @04:05PM (#25116991)
If a Rails back-end streamed video, there wouldn't literally be a loop written in Ruby shoving bytes back and forth stored in Ruby arrays or buffers. It would be farmed off to something appropriate. You wouldn't necessarily want that machine to be doing it, using any middleware.
Re:Moving my serverless project to Ruby on Rails by the-dude on Sunday November 15, 2020 @02:06PM (#25103754)
Which newspaper is hitting 2k req/s ?
Re:Moving my serverless project to Ruby on Rails by tutfbhuf on Sunday November 15, 2020 @04:45PM (#25105204)
For example:

https://stackoverflow.com/a/373188

> Wikipedia seems to be 30000 to 70000 [requests] per second spread over 300 servers

So 2k is not unusual for bigger news sites, that may or may not employ a (few) rails team(s).

Re:Moving my serverless project to Ruby on Rails by thirdusername on Friday November 20, 2020 @01:36PM (#25163398)
That’s only 100-250rps per server, that’s really not very hard in any framework.

Financial exchanges are doing 100,000rps of transactions per sever. That’s hard.

Re:Moving my serverless project to Ruby on Rails by treis on Sunday November 15, 2020 @11:27AM (#25102343)
Compared with developer time servers are cheap. Even for a single developer being 10% quicker at development equates to dozens to a hundred servers.
Re:Moving my serverless project to Ruby on Rails by marsdepinski on Sunday November 15, 2020 @01:36PM (#25103490)
Yet somehow the popular industry pattern adopted by the industry is to waste ad much developer time as possible.
Re:Moving my serverless project to Ruby on Rails by stepbeek on Monday November 16, 2020 @07:34AM (#25110875)
I never understood this until I was self-employed. I now feel this in my soul.