When Vaadin Is the Wrong Choice and What to Use Instead
Where Vaadin fits badly: public sites, huge concurrency, offline apps and heavy custom UI. How to tell early, and what to choose in each case.

Vaadin is a good tool with a clear shape. Most of its failures come from using it outside that shape. These are the cases where another approach is better, with the reason for each. The comparison with alternatives is in Vaadin versus React.
A public site that must rank
A public page needs clean URLs, fast first paint, small HTML and caching at the edge. Flow renders a client application and keeps state per visitor, so crawlers see little and a CDN cannot cache the page. Use server rendered pages, as in Thymeleaf with htmx, or a static site generator, and keep Vaadin for the authenticated side.
Very high concurrency
Every open tab owns a server tree. The memory model in sessions and memory is fine at hundreds or a few thousand users and expensive at tens of thousands. A stateless API with a browser client scales horizontally with far less memory per user.
Offline or poor networks
Server round trips are the programming model. When the connection drops, the UI stops. Field apps, mobile web apps and anything that must work offline need logic and storage in the browser.
Heavily custom interaction
Drag and drop canvases, drawing tools, real time collaboration cursors and games want direct control of the DOM and events. You can wrap a JavaScript library in a custom component (custom components), but when that is the whole app, the framework is in the way.
A team that already has a frontend platform
If the company has a design system, a component library and React developers, adding a Java-only UI creates a second way of building screens. The reduced context switching is only valuable if the team is Java-first.
A regulated look and feel
When a design agency hands over pixel specifications, theming a component set to match them costs more than writing the markup. The theme layer is flexible but not unlimited (theming).
A way to keep options open
Route by path so that each part of the product uses the right tool, with Vaadin restricted to the staff area:
@Bean
SecurityFilterChain chain(HttpSecurity http) throws Exception {
return http
.authorizeHttpRequests(a -> a
.requestMatchers("/", "/docs/**", "/blog/**").permitAll()
.requestMatchers("/app/**").authenticated())
.build();
}Public pages are ordinary controllers and templates, and the Vaadin routes sit under /app.
A quick test
Answer these before choosing:
- Does a search engine need to read these pages?
- Will more than a few thousand users be connected at once?
- Must it work without a network?
- Is the interface mostly custom, not forms and tables?
One yes means look elsewhere or split the application. A split is common: a public site in one stack and an authenticated tool in Vaadin, sharing the same services.
Test the three claims on your own application
Each reason to avoid Vaadin is a claim about a measurable property of the application. Check them against a prototype before deciding, with a few commands that take minutes.
First, what a search engine receives. Fetch the page as a crawler does, with JavaScript off, and look at the text.
curl -s https://app.example.test/products/42 | sed -e 's/<[^>]*>//g' | tr -s ' \n' | head -20A server-rendered page prints the product name and description. A Vaadin Flow page returns a shell that loads the client engine and renders the content after a round trip, so the output shows little text. Some initial content may be present in the first response depending on the version and the configuration, so compare the two outputs for your page rather than assuming. If the page must rank on its content, a conventional server-rendered stack, Thymeleaf or a Next.js front end over a Java API, serves the crawler directly.
Second, how much server memory each user costs. Flow keeps the UI state of each session on the server, so memory grows with concurrent users. Measure it with a script that opens N sessions and holds them, then read the heap.
for i in $(seq 1 200); do curl -s -c /tmp/jar_$i -o /dev/null https://app.example.test/ & done; wait
jcmd $(pgrep -f app.jar) GC.class_histogram | head -12Divide the growth in retained heap by the number of sessions. A back-office screen with a few components may cost a few hundred kilobytes per session, and a data-heavy screen with a large grid costs far more. Multiply by the number of concurrent users you expect, with a margin, and compare with the memory you are willing to run. If the answer is 50 GB for the peak, a stateless API with a client-side front end is cheaper to scale.
Third, what happens on a bad network. Every interaction is a request to the server. Throttle the browser's network to a slow connection in developer tools and click through the main flow. If a click takes two seconds to respond, users on mobile networks will feel it, and an offline requirement cannot be met at all. Applications for a warehouse, a field team or a train need a client that holds state locally.
Where it is the right choice
The same measurements show where Vaadin works well. An internal tool with fifty users on a company network, built by Java developers, with forms, grids and charts, ships in a fraction of the time of a separate API and single-page application, because there is one language, one deployment and no API contract to design and version. The server holds the state, so security checks stay on the server, and refactoring is done with the Java tooling you already have. That combination is the strongest argument for it, and it is why the guidance here is to choose by the shape of the application and not by taste.
@Route("orders")
class OrdersView extends VerticalLayout {
OrdersView(OrderService orders) {
Grid<Order> grid = new Grid<>(Order.class);
grid.setItems(query -> orders.page(query.getPage(), query.getPageSize()).stream()); // lazy loading from the service
add(new H2("Orders"), grid);
}
}Keep the exit open
Even when you choose Vaadin, keep the business logic in services that know nothing about the UI, as the code above does. If requirements change, the UI layer can be replaced by REST controllers over the same services without touching the domain. A project that puts SQL in click handlers can only be rewritten. The decision is easier to reverse, and cheaper to make, when the UI is a thin layer on top of a tested service layer.
Where this does not apply
Internal tools used by staff over a stable network are the case Vaadin is built for, and the rules above rarely bite. The Vaadin overview describes the intended use, and Spring's web documentation covers the alternatives.


