josefrichter

josefrichter

Phoenix app for high-concurrency limited-capacity course booking use case?

I have a legacy system for managing courses at the university. Every half year, this happens:

  • limited capacity course (30 people) opens
  • 1000 people trying to enroll in that course at the same time (literally waiting at computers to hit the “enroll” button at 8:00am sharp)
  • dozens/hundreds of courses like that, thousands/tens of thousands of people in the system fighting for free slots literally at the same time
  • system (php based) goes down…

I’d have the following questions:

  • could phoenix significantly improve performance and reliability here?
  • would I enjoy significant improvement “out of the box” even without employing any advanced techniques like ETS, etc.?
  • is this mostly the webserver issue, or is postgres also a potential bottleneck?
  • is it possible to roughly guesstimate some numbers? how much traffic I might be able to handle at what cost?

Thank you very much for any suggestions and advice!

Most Liked

josefrichter

josefrichter

Thank you. I really appreciate the honesty of saying elixir would be great, but I can still save the day with current technology. Fair answer! Even though massive scaling would be required, it’s still just 2 days every year, and thus probably cheaper even in medium- to long-term :+1:

lpil

lpil

Creator of Gleam

Hello!

Elixir is great at handling high load, but if you have an existing system and know exactly when the load is going to happen is there a reason not to avoid the re-work and instead scale up the existing PHP application before the event happens? I would dramatically increase the size of the database instance and horizonally scale the PHP application the day before and scale them back down the day after.

This will cost a little money but it’ll save huge amounts of developer time compared to a rewrite, and develoer time is far more expensive than servers.

aenglisc

aenglisc

To me it sounds as if the business process should be re-engineered rather than the code :slight_smile:

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
New
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

We're in Beta

About us Mission Statement