Salut Florent,
Welcome to our list.
- What are the CPU/RAM quantityies recommanded to use BaseX in production ?
...
I'm giving you a single answer to your first three questions: It's difficult to give you general advice here, as it mostly depends on what you plan to do with the stored documents. If your data is static, you should be fine with a small amount of memory assigned to the JVM (even 64m can be ok), as most of the caching will be done by the OS anyway.
- With my database, on a t2.micro EC2 instance (1 VCPU + 1 Go RAM),
BaseX is unusable.
That's a good hint. What does "unusable" mean? Did you encounter problems to create the database, or are your queries running out of memory?
On my shared server, a request like "curl 'http://mydomain/rest/database/file.xml?query=/a/direct/path' takes 1.5 second.
If you know that there will only be one "direct" or/and "path" step, you could try the following query (or similar ones):
/a/direct[1]/path[1]
Does your measurement include the serialization (the output) of the result? If yes, do you think that the result size could be an issue?
- How many simultaneous requests can handle BaseXHTTP ?
BaseXHTTP applies Jetty as web server. I am actually not sure what limit Jetty imposes, but most probably it exceeds the maximum of BaseX.
By default, the BaseX itself supports 8 simultaneous transactions [1]. The default can be changed, but, in practice, smaller values yield better results because it reduces the amount of random I/O operations on disk. The main reason for providing concurrent requests at all is not performance, but to allow the execution of other operations while slow operations are being answered.
Hope this helps, Christian