I'm working on a backend for a frontend application for a portal that has grown over the last years and already counts over 2500 unique endpoints/rest methods. We're using Jersey for our RESTful services, and I have a couple of questions regarding the performance and best practices for handling such a large number of endpoints.
Limitations on the Number of Root Resources:
Are there any known limitations or performance considerations when having a large number of root resources in a Jersey application? I've searched the documentation and community forums but haven't found any hard numbers or specific guidelines. Has anyone experienced performance degradation or other issues when scaling up the number of root resources? If so, what were the symptoms, and how did you address them?
Nested Structure Using Sub-Resources:
Would using a more nested structure with sub-resources perform better in terms of URL matching and overall application performance compared to having many root resources? Are there any best practices or recommendations for anizing such a large number of endpoints in a Jersey application? Should I prefer deeper nesting of sub-resources, or is it better to keep the structure relatively flat? Any insights, experiences, or recommendations would be greatly appreciated. If you have any benchmarks or real-world examples, that would be even more helpful.
Thank you in advance for your help!