doogs

doogs

Tsung Load Testing Phoenix App

I have an elixir/Phoenix app which I am currently load/stress testing before releasing into the wild.

Currently using Tsung as my test tool.
When running test on my local machine (distillery release in PROD mode) the transaction times seem to increase with every user login.
I have run similar tests on the production environment and it seems to follow the same pattern.
See graph below.


tr_deposit is a POST request. this is fine and always under 1 second.
I’ts the logins and page requests that worry me. Is this normal?
even when i change the comeonin bcrypt_log_rounds to 4 it follows a similar curve, although slightly faster.
Note: This is on a phoenix browser pipeline but with CSRF disabled. With CSRF Tsung does not seem to be able to accurately post and I end up getting lots of 403’s.

How is this explained?

What would be a realistic expectation of transactions times when you have 10 users a second logging in?
I thought that these sort of numbers would be easy to manage in Phoenix?

Most Liked

OvermindDL1

OvermindDL1

For note, Comeonin is specifically designed to be slow to hash the password, that is part of its security, so it will limit the number of simultaneous logins. The general idea is that logging in is fairly rare and using the site once logged in is common. Otherwise I would delegate to an OIDC server for login or so instead.

Thus logging in ‘should’ be slow, it’s to prevent people rapidly checking passwords (even if your database gets leaked!). Page likely shouldn’t be slow but without seeing what it does then can’t say.

But overall, if you don’t want the cryptographic CPU cost of a bcrypt or argon security style then I’d really say handle logging in via another OIDC server or so.

idi527

idi527

:waving_hand:

Can you provide what the function that you are benchmarking actually does and your tsung config?

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement