Live data from Hacker News

My £4 a month server can handle 4.2M requests a day

mark.mcnally.je

391–400 of 479 posts

Re: My £4 a month server can handle 4.2M requests a day

#391
post #368

Earlier quoted context omitted.

He got an MP on his side which seems to be all it takes these days in the UK.

You’d be amazed at how cheap it is. You can usually get an MP to do your bidding or say your piece in Parliament for a donation of £10k or less. I’ve never heard of anyone paying more.

[deleted]

Re: My £4 a month server can handle 4.2M requests a day

#392

Earlier quoted context omitted.

Simply moving my USB mouse consumes 10% of my CPU. Computers these days...

Back in the day, moving your mouse made things look like they were processing faster.

Not just _look like_ — on Windows 95, moving the mouse _actually_ made things process faster, for fairly bizarre reasons.

Source: https://retrocomputing.stackexchange.com/questions/11533/why...

Re: My £4 a month server can handle 4.2M requests a day

#393
post #368
post #358

Earlier quoted context omitted.

Focusing on a small but important detail that some have already mentioned but with a more aggressive tone... was your "loophole" system tested in an actual litigation at any point? What I mean is that this: > The IoM server would call the Swiss server every time a hand was dealt might seem like a clever loophole around the laws in IoM, but in reality it sounds to me like the kind of technicalities that wouldn't reall…

He got an MP on his side which seems to be all it takes these days in the UK.

The IoM isn't in the UK and nor does it have MPs. Probably just semantics but I have to point that out.

Re: My £4 a month server can handle 4.2M requests a day

#394
post #358

Earlier quoted context omitted.

Focusing on a small but important detail that some have already mentioned but with a more aggressive tone... was your "loophole" system tested in an actual litigation at any point? What I mean is that this: > The IoM server would call the Swiss server every time a hand was dealt might seem like a clever loophole around the laws in IoM, but in reality it sounds to me like the kind of technicalities that wouldn't reall…

Yeah, that's like setting up a casino in one location with a permanent phone line open to switzerland to ask where the ball landed on the roulette wheels. Doesn't seem like it would hold up under scrutiny.

That's exactly what it was... and it really depends on how a locale defines gambling. In Costa Rica, for instance, you can run the game of chance as long as the money isn't landed onshore, because you're just generating random numbers. IoM was slightly different in that they didn't mind you landing cash, they just wouldn't allow you to generate the numbers. So it seemed natural to co-locate, and then Switzerland was a better backstop than either.

Re: My £4 a month server can handle 4.2M requests a day

#395

Earlier quoted context omitted.

Why go through IoM at all? Why not Costa Rica -> Switzerland, rather than Costa Rica -> IoM -> Switzerland?

Good question. The original plan was to take normal payment methods (Visa/MasterCard) but it became apparent after Bush passed the ban on online poker that Costa Rica was going to follow suit (or that visa/mc would soon start holding up payments from CR casinos... in which case we might be stuck with debt we couldn't use to pay winnings). Setting up a CR bank acct as a shell requires you to hand over power of attorne…

With all this trouble, why not just set up shop in one of the many places where online gambling is legal?

Re: My £4 a month server can handle 4.2M requests a day

#396

Earlier quoted context omitted.

What Andy giveth, Bill taketh away.[0] I'm more than a little annoyed that so much data engineering is still done in Scala Spark or PySpark. Both suffer from pretty high memory overhead, which leads to suboptimal resource utilization. I've worked with a few different systems that compile their queries into C/C++ (which is transparent to the developer). Those tend to be significantly faster or can use fewer nodes to p…

I work in the Analytics space and been mostly on Java and I am so glad that other people feel the same. At this point, people have become afraid of suggesting something other than Spark. I see something written in Rust to be much better at problems like this. I love the JVM but it works well with transactional workloads and starts showing its age when its dealing with analytical loads. The worst thing is then people…

> I love the JVM but it works well with transactional workloads and starts showing its age when its dealing with analytical loads.

This is interesting. Can you elaborate a bit?

Re: My £4 a month server can handle 4.2M requests a day

#397
post #41

What's the point of this post? OP is serving a file at 50req/sec. There is not even mention of a dB query. How is that able to relate to any kind of normal app? I guess that the post was written as an answer to the mangadex post [1]. Mangadex was handling 3k req/sec involving dB queries. It was not just a cached Html page. 50req/sec for a Html file is super low which shows that a $4 month server cant do much actually…

>There is not even mention of a dB query. Did you read the post?

From the guidelines[1]:

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

[1]: https://news.ycombinator.com/newsguidelines.html

Re: My £4 a month server can handle 4.2M requests a day

#398

Earlier quoted context omitted.

Yeah, that's like setting up a casino in one location with a permanent phone line open to switzerland to ask where the ball landed on the roulette wheels. Doesn't seem like it would hold up under scrutiny.

That's exactly what it was... and it really depends on how a locale defines gambling. In Costa Rica, for instance, you can run the game of chance as long as the money isn't landed onshore , because you're just generating random numbers. IoM was slightly different in that they didn't mind you landing cash, they just wouldn't allow you to generate the numbers. So it seemed natural to co-locate, and then Switzerland was…

In any case I must admit that the trick, while we agree wouldn't (probably) hold water in court, it might have actually helped (we'll never know) to keep that casino out of some law enforcement watch list... especially if the officers were too overburdened with more important issues / lazy enough / not looking into that kind of activities at the time.

Re: My £4 a month server can handle 4.2M requests a day

#399

Earlier quoted context omitted.

> The trick I have found is to establish a websocket with your clients, and then pipe all of their events down with DOM updates coming up the other way. These 2 streams are entirely decoupled by way of the ringbuffer and a novel update/event strategy. Could you detail this, please? I don't get it. What is the flow? 1. Browser is sending events to web server via web socket, instantly as the event is occurring (?) 2. ?…

You got 1 correct. Everything that happens gets sent immediately as an event to the server (e.g. KeyDownEvent). These are pushed without blocking for a response to each - The websocket guarantees delivery and ordering. Upon receiving an event from the client socket, it is immediately inserted into the LMAX ring buffer for processing. Updates to the client are triggered by events+state determining when a redraw is req…

Thank you!

Re: My £4 a month server can handle 4.2M requests a day

#400

Earlier quoted context omitted.

That particular example seems like something that's probably a lot cheaper than you'd initially think. The OS has to constantly take mouse input anyway to move the pointer and dispatch events to userspace. It also needs to record the current and new position of the mouse pointer to dispatch the events. Detecting whether the mouse is being "shaken" can be done with a ring buffer of mouse velocities over the last secon…

Thanks for the thoughtful analysis and napkin math. You may very well be right. I wonder if this is true in practice or if they suffer from any interface abstractions and whatnot.

On every modern (past few decades) platform, the mouse cursor is a hardware sprite with a dedicated, optimized, *fast* path thru every layer of the stack, just to shave off a few ms of user-perceived latency. Grab a window and shake it violently, you'll notice it lags a few pixels behind the cursor - that's the magic in action.

In some places there's no room left for unnecessary abstractions, I can imagine most of the code touching mouse / cursor handling is in that category.

Post reply on HN