Very, very, important question

Hi guys ! As a frustrated developer who must use Adobe Flex for a GUI in a firm I work for, just want to kindly ask for your opionion considering scalability matter.
Well, honestly, I’m sick and tired of my colleagues’s negative energy throwing on Vaadin as they claim that Vaadin must be avoided in eneterprise applications because of the “scalability problem” as they say ! Personally, I find myself blessed for working in Vaadin, but obviously, other do not.
So far I’ve used Vaadin from version 6 unwards, and honestly I’ve haven’t used in large environments, but those very same colleagues who hate Vaadin use one of the apps I personaly made :slight_smile:
Long story short, I’d be very grateful to hear your experiences related to real-life projects which work in enterprise environments preferably, or other similar and comparable environments. I’d like to see concrete numbers, e.g. server resources characteristics, no. of concurent users, number of views and similar properties which you value the most.
BIG THANKS IN ADVANCE !!!

Hello,

First, when speaking about scalability of Vaadin vs non-Vaadin Java web app, it is important to realize what are the things that impact the scalability. I have tried to explain this below.

Things affecting Java web application scalability

  1. Database: database configurations, server setup, clustering etc.
  2. Data access (backend): ORM, repositories
  3. Business logic layer (backend)
  4. Vaadin server-side: Vaadin sessions, UI logic
  5. Vaadin client-side: browser rendering
  6. Web app hosting: clustering, CDN etc.

About these topics/layer, only 4 and 5 are really Vaadin related. Other topics are common for any other JavaEE/Spring etc. web application.

Let’s take first the 4 (Vaadin server-side): This might be the thing which has confused your colleagues. Since Vaadin is server-side framework, it stores state of your web application in the HTTP session. Thus, if your web app’s state is big you need more memory to serve several concurrent sessions. Fortunately, keeping this in mind from the beginning of project, it is rather straightforward to make sure that session size won’t grow too big (see links in the end of this post for more information). For example, if your session size will be 200KB, the session timeout 30min, and typical time your user will use the app is 3min. Then to serve 10k users in one hour (~500 concurrently active), you would need at least 1.1GB of memory (or 2GB to be on safe side since you would like to have 50% of mem free for peaks etc.).

In addition to the memory usage, the server-side Vaadin logic uses a small amount of CPU too. But, this overhead is so small that it hardly has any affect to your web app’s scalability.

Then, about topic 5 (Vaadin client-side). This is not directly related to the scalability but more on the vaadin browser rendering performance. If this is the topic on which you would like to have more information, see for example following page:
https://vaadin.com/docs/v8/framework/articles/OptimizingSluggishUI.html

Then, about real-life projects. I think a typical real-life web application writen with Vaadin is used by around 50-500 users concurrently. though, I know some web apps delivered by us that have around 2000 concurrent users at their peak hours. But, in my opinion, you should be easily achieve scalability for tens of thousands of concurrent users by distributing the load for several nodes and taking care that your session size doesn’t increase too much.

Finally, let me introduce some of our scalability related pages too:
https://vaadin.com/framework/scalability
https://vaadin.com/docs/v8/framework/articles/ScalableWebApplications.html

If you have any further questions or if I missed some topic above, do not hesitate to ask more.

Kind regards, Johannes

PS. We deliver every now and then scalability assessment as a service for our customers. If you are interested in to have this kind of service, please contact our sales (https://vaadin.com/company/contact) or me ([firstname]
@vaadin.com) directly :wink:

Thanks a lot for very useful information…

Scaling vaadin application have different approaches

  1. sticky sessions - easy scaling but with a drawback if instance dies user looses his/her session and gets ugly notification.
  2. session replication - land of wonder with monsters

You take a blue pill and stay in sticky sessions paradigm and blive what you want to belive. You take a red pill and i show you how deep the rabbit hole goes.

Everything is about trade offs. If you are ok with weekends heroics for installing newer release, overhours for deploying hotfixes, and customers are ok with getting sometimes session exparation notifications then its easy. If you want zero down time, multiple deployments per day well … its hard.