During the testing phase, we are using Flexmonster Data Server connected to MySQL. We noticed that indexes are stored in memory, and one of them, which queries approximately 1,700,000 rows, is consuming around 7 GB of RAM. This index belongs to a single database, but our goal is to scale the solution to around 500 different databases, which could exponentially increase memory usage.
We have smaller indexes, such as those using simple GROUP BY
queries or returning around 1,000 rows. For these cases, we would prefer to avoid caching and allow direct querying, since the data volume is small and response time would be acceptable.
We would like to know if Flexmonster Data Server allows configuring which indexes should be cached and which should be queried directly without caching.
We are also open to suggestions for optimizing memory usage, including testing scenarios without caching, where queries are executed on demand. Are there any recommendations or best practices you suggest for this kind of approach?
Hello, Marcos!
Thank you for reaching out to us.
Flexmonster Data Server was primarily designed to work with large indexes and provide fast access by caching them in memory. At the moment, it does not support a configuration option to keep some indexes uncached while others are stored in memory.
For smaller datasets, where loading time is acceptable, we recommend returning the data from your backend as JSON or CSV, and then connecting Flexmonster to your server-side script by following our guides:
This way, you can avoid memory overhead for lightweight queries while relying on FDS for large datasets, where in-memory indexes bring performance benefits.
Please let us know if our answer helped you.
Best regards,
Maksym
Hello, Marcos!
Hope you are doing well.
We would like to know if you had time to try using server-side scripts returing CSV or JSON for conenctin to SQL queries returning small volumes of data.
Please let us know if this approach works for you.
Best regards,
Maskym