'Standard' vapor website drops 1.5% of requests, even at concurrency of 100!

i think that the title of this post is a little click-baity because we’ve been using SwiftNIO (which is what Vapor is built on top of) for about two years now and have not observed anything resembling a failure rate of 1.5%. that is a lot of requests, and if we were losing that many we wouldn’t be showing up in Google search results period.

in particular, we use Swift to serve Swiftinit, which is a large site that handles a lot of requests (but nowhere near 8,000 per second) and have not had major issues with dropped requests.

in the server industry you basically have two types of costs: humans and “electricity”.

i think that Swift is really good if you want to save on electricity. it’s truly remarkable how little memory Swift applications use (if written by experienced engineers) and you can run big services on some really tiny nodes. we are actually overprovisioned right now (due to investing in AWS savings plans) and could be paying a fraction of what we’re paying right now (which is already not much) if things like cross-compilation had been supported when we made the original investment.

on the other hand, you might have a hard time if you’re trying to save on human costs, and at many companies the cost of paying developers dwarfs the cost of paying for electricity. you really do have to reinvent everything yourself, which includes things such as modifying, compiling, and distributing your own custom Swift toolchains because Swift does not officially support the cloud platforms you are deploying to.

i think the focus on BigInt in this thread is illustrative because in the past at a different company i recall experiencing similar difficulties with underdeveloped libraries and being blocked by things like IEEE decimal support or ION support. back then, interest rates were lower, funding was easier, and people really did do things like take monthslong detours to actually write these libraries from scratch. but that didn’t pan out in the end, and i can’t imagine making the same decision myself in our current economic environment.

9 Likes