Closed paolodedios closed 6 years ago
1000 is around 10x higher than what I am aware has ever been tested. I think the fixed cost per searchdefinition is too high to scale above approx 100. I think the main fixed resource is memory. You would definitely also need SSD to handle the I/O as the data are stored in separate directories/files.
Yes, Vespa is definitely not tuned for this - the search definitions are supposed to correspond to actual data types in the application, which tend to be below a few tens at most. What are you trying to achieve here? Perhaps we can help you find a better way to do it.
I am trying to see if it is possible to port an application that accepts and indexes an uncapped number of user-defined document types. More importantly:
It sounds like partitioning and delegating subsets of document types to multiple indexed content clusters would be more manageable for Vespa from a resource management point of view.
Alternatively, can a single search definition be partitioned into groups of related fields that are managed separately as if they were separate document types? Would this strategy allow for feeding/re-feeding of only portions of the data without having to rebuild the entire index?
Ok, Vespa does have a multitenancy mode, but on the application, not search definition level - most applications do not consist of just a search definition and data but also query profiles ml models, Java components, a particular layout of clusters and data etc., and you typically want isolation between applications for security and availability (avoid one application feeding all others to death etc.). We don't have user level documentation for it, but some people have been walking down this road already, see https://github.com/vespa-engine/vespa/issues/5507 if you are interested.
To your questions, it wouldn't help deployment time to split into multiple content clusters as all of them would still need to be processed on deployment. You would have to split into multiple applications once you go beyond a few hundred.
Alternatively, can a single search definition be partitioned into groups of related fields that are managed separately as if they were separate document types?
Yes, document types support multiple inheritance so you can create a different one for each group of fields then inherit the groups you want into a particular concrete document type.
Would this strategy allow for feeding/re-feeding of only portions of the data without having to rebuild the entire index?
That is supported regardless of how the fields are defined: You can send write operations to any one field, or a set of fields and they will be consumed without impacting the other fields of those documents.
Would deploying multiple applications via Vespa's multi-tenancy feature yield benefits over deploying multiple, single tenant clusters through a cluster manager like Kubernetes or Mesos? Does the Vespa multi-tenancy feature provide more granular control over resource management or enforce some sort of SLA per application?
I will experiment with the various deployment strategies outlined above. Thank you for taking the time to answer my questions.
With the multi-tenancy feature applications don't control what hosts they are allocated - ho hosts.xml and instead of node lists in services you just say
With that solution Vespa enforces the placement constraints etc. that is needs. They could probably be expressed in k8s at this point, but that was not the case when we did this work. We don't have auto SLA enforcing (e.g autoscaling) yet, it's on the roadmap, but challenging for stateful systems.
Thank you for answering my questions. Closing this issue.
Deploying an application using Vespa 6.278.1 with 1000 search definitions on a 5 node cluster consisting of 1 config server, 2 search nodes and 2 content nodes (each with 16GB of RAM and SSD storage) results in HTTP status code: 504. Time 'vespa-deploy' timeout used was 600 seconds but the command returns within 2 minutes with the reported error.
All search definitions were deployed to a single content cluster with a services.xml configuration similar to the following:
Reducing the number of search definitions to 750 document types results in a successful deploy so it seems like the deploy process is somewhat resource bound on my cluster when the number of searchdefinitions approach 1000 unique document types.
When the application did deploy with fewer searchdefinitions (~750 in my case), it seems to spend a lot of time (hours) creating and deleting index files and exhausting RAM while doing so.
The vespa search sizing guide doesn't seem to detail the relationship between the number of unique searchdefinitions/documents to the amount of resources required for a cluster. As a result I have the following questions.
Is the vespa-deploy timeout parameter specific to a different part of the deployment process?