Real World Usage

Hi there,

i have seen that some big companies are using Vaadin as well Who Uses Vaadin? Well-Known Customers & Success Stories
I guess that the big companies have even more users then me, but it would be intersting of how many users they are serving with vaadin flow.

Or maybe some one has experince as well like “Server with 8GB RAM and 2 Core” offers an app for 500 Users or so.

Does anyone has some real world experience? (I know the RAM usage depends on size of loaded elements and datasets in UI etc.) But i would really like to get some technical facts, how much ram, core, xmx, instances are used in real applications.

I am currently runnig several VMs (one per customer who can have 50 users). Each VM has 2-4GB Memory. But i consider bringing all into one app and make it a tenant app. So i have have a better infrastructure (not several VMs to maintain).

Looking forward to get some experience of you guys how many users you serve and which power your maschine have.

Just a small example: concurrent users 250-400 with a user pool of ~6-7k user… the application stays happily at 2-4GB RAM and 2 CPU (mostly idling)

So don’t worry too much about those numbers

2 Likes

Thank you. So you have 6k users and 400 are parallel stressing the app? What does your app make mostly? „Only“ crud data or other jobs as well?

How do you host it? Using Kubertnets with instances or on bare metal as a service?

In my app users upload files etc, I think this could be a bottle neck. If 10 users upload a txt or some other files which are parsed.

One example:
1500 users on one Docker container with 6 GB.
We did load tests with 500 concurrent users. No problem.

1 Like

Not directly related to Vaadin but just to give you an idea in how much load a Java app can serve

1 Like

Only thing that is stressing… is the external synchronous SOAP request for some operations within the app. Typical business application with forms with up to 50 input fields… don’t ask :sweat_smile:

I’m not a fan of kubernetes - it’s serves no purpose in so simple setups. It’s just a RHEL VM

1 Like

I havent used kubernetes as well. Cant see an advantage, maybe later some other day it will be eye opening.

How do you track/monitor you application? I start my app with xms4g and xmx4g and periodically check the usage if Garbage Collection is able to clean up the heap. So i would be worried if the heap stays at 3gb for example and it will not shrink.

I would really appreciate if there would be a reliable way to meassure the consumption of vaadin. But its not that easy see here Vaadin Session Size Tracking - #9 by Tatu2

Thats the only reason which hold me back to use vaadin in more bigger projects. I can not really predict how much it will use/need etc.

You normally use micrometer/prometheus/grafana with Spring Boot projects and you get really solid information about your application health.

It’s of course always specific to what the application does but as a general rule of thumb, your first constraint with a typical server will be memory. Count on between 100 KB and 1 MB of memory per active user and then something like 200 MB for the operating system and the JVM. This means that 2 GB of memory should be good for between 1800 and 18000 concurrently active users.

You can get a x2gd.medium on EC2 with 16 GB for $60 which is comparable to a single hour of software development. That amount of memory should be good for between 16000 and 160000 concurrent users. Throw a decent monthly developer salary at it and you get a x2idn.24xlarge with 1536 GB of memory for around $7000 per month and you have enough memory for at least a million concurrent users.

Oh thats a lot, but maybe in best case “1000 User have opened a view” without navifation etc and thats it? Its like a electric car “You can drive 500km (but its measured with 25°, no mountain, no wind etc ;))” I think you get what i mean.

But 2000 Users would definetly be enough. I will try to investigate how much a user really need. As mentioned i have not only crud, also upload download which also will be memory consuming.

I hope i can find a reliable way which confirmes the usage anyhow. Before i restructure my project and buy a licence. So i must be 101% sure, but i have glue how to check reliably

Another way of looking at it is to see that EC2 has an instance type for almost any amount of memory you want between t4g.nano with 512 MB and u-12tb1.112xlarge with 12288 GB. The running cost per amount of memory gets a bit higher at the really small and the really big ends but it’s still almost always under $1 per month per 100 concurrent users if assuming 1 MB per user.

Doesn’t have to be memory consuming if you stream the data straight to or from cheaper storage (e.g. disk, database, or something like S3) rather than buffering it all in memory. But that might of course not be feasible if you also need to somehow analyze the full contents of the files in one go. If you use Spring Boot, you just have to watch out with buffering since multipart requests are by default buffered in memory before anything is passed to the application.

1 Like

Thats really interesting. I thought Amazon is really expensive, but its not that expensive if you break the costs down per User .

I have some code lines where i read files into a byte array, for example to present the image ( which is saved as a blob) to the user oder download files which has been uploaded. Thats a big memory consumer i think.

All the big cloud providers are aggressively competing against each other for the basic stuff such as virtual machines (e.g. EC2), storage (e.g. S3) and compute (e.g. Lambda). It will be cheaper in the long run if you buy and run your own hardware but what you pay for with a cloud provider is also the flexibility of switching to a smaller or bigger instance at any time.

There’s no need to load the files into memory if they are just downloaded as-is. The download handling page in our documentation has an example of fetching an attachment from the database when handling a download request and streaming the content from the java.sql.Blob directly to the user. A similar approach can also be used for other storage solutions that gives you an InputStream to read from or that can write data to an OutputStream.

2 Likes

We have a Vaadin 24 application with 200 teams and 2900 users. Most of them using the application once by day, requesting 2-3 pages per day. Absolutely no problem. We are on Kubernetes with 2 Vaadin+SpringBoot frontend pods and 2 SpringBoot+SpringData+Hibernate backend pods which are connected to Oracle.

1 Like

2900 Users? Oh wow thats huge. What server specs does your infrastructure have?

I dont have uses Kubernetes so far, but pods sounds interesting. I am looking also for a way (if i decide do merge my apps) how i can update them with no downtime. Currently the problem is, that the sessions gets killes if i redploy, so user loses his content what he entered.

Are there ways with Kubernetes to keep the data while redeloying?

Ah looks like this post is important Getting started with Kubernetes Kit | Vaadin
and Vaadin and Hazelcast: A match made in heaven | Vaadin
Do i understand correctly, that hazelcast keep track of the session so a redploy will not remove useres input?

Kubernetes doesn’t give you any performance benefits by itself; it’s more about managing resources in a cloud-friendly way. So if you need, say, multiple redundant application servers, a reverse proxy in front of each, redundant database servers, and so on, Kubernetes gives you the tools to manage this whether you deploy things on local servers or in AWS/Azure/GCP/etc.

1 Like