The Vespa Container

The Vespa Container (also known as QRS or JDisc) is the home of all application specific plug-ins in Vespa. It can also be used to build standalone server applications, but in Vespa it is the basis of the search container and document processing. As the Search Container, it handles all incoming queries, and returns results. As the Document Processor Container, all documents fed pass through it. In both cases, this allows plug-ins to process or modify all queries, results and documents based on application requirements.

The Container provides a development and hosting environment for processing components, and a model for composing such components developed by multiple development teams into a functional whole. The goal is to allow query, result and document processing to grow to great levels of sophistication by providing a strong component model including isolation, while still providing great development ergonomics to allow developers to experiment with new functionality.

Main features:

  • An OSGi based component model which allows deployment and un-deployment of components to a cluster of running instances, as well as isolation and controlled sharing of classes between components
  • A general model of Documents, Queries, Results and the components processing them
  • A composition mechanism – chains – for building applications from components and managing the execution order dependencies
The container comes bundled with a framework for federating applications. It is run by all the container nodes in a Vespa installation.


The plug-ins in a container may be a general component, just using the OSGi integration of the container to deploy arbitrary application specific components, or it may be one of the types of components defined by Vespa itself. The plug-ins used by Vespa are searchers, document processors (docprocs), handlers and renderers. Searchers are result and query processors. Document processors transform or analyse all documents fed to Vespa. Handlers are used to handle user requests which should not be processed directly by any searcher, e.g. building web services which then generate searches. Renderers are used to render result pages when responding to a request.

Searchers and document processors are executed in chains. A query is passed from searcher to searcher in a chain. The searchers are executed in a synchronous fashion, each taking ownership of the query passed to them. Searcher order is in other words execution order, a searcher which is before some other searchers, gets the query before these searchers. Since the result is returned through the same chain, a searcher early in the chain, will be late to access the result. Document processor chains do not return any kind of results, they only pass on the processed documents to the next component.

All kinds of components are usually deployed as OSGi bundles in the Vespa application package.

Upgrade of Plug-ins

When a new version of the application is deployed, a new instance of the plugin is created. There is a period of time during which the new and old version of the plugin run concurrently.

All new requests will be forwarded to the new plugin instance, while the old requests are finished by the old instance, and then the old instance is deconstructed. This allows upgrade of the application without any disruption in service.