I have to create one API which will provide dam assets [I am using dynamic media to expose assets] along with metadata to third party systems [assuming pagination will be there at both ends and will get max 50 assets in one call] . Let's say there is a huge load of concurrent users on a third party portal where my API is used , just want to know if anything needs to be done for caching or make my API optimized.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Anoop_Garg
Sitemap generator is one of the example where sitemap generator by scheduler. https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en
For memory cache you can use ACS Commons or guava cache https://www.linkedin.com/pulse/enhancing-aem-performance-http-cache-acs-commons-divanshu-goyal/
Hi Anoop,
There are lot of things that you can keep in your mind while designing and developing your APIs. Some of the important once are
: CDN based caching (it will allow the data to load faster)
: Use of Load Balancing tool
: Compress responses to reduce transfer time
: Abuse Prevention - The best way to avoid these problems is to implement a rate-limiting strategy. By measuring the number of transactions per second, per IP address, or token (if each client is authorized before accessing the API), you can cut off API clients that make excessive requests and prevent DDoS-like slowdowns from accidentals.
: Perform load test of APIs on tools such as Jmeter, webLoad
: Code optimization
Here are some useful articles on the same:
https://prismic.io/blog/api-response-times
https://loadninja.com/articles/optimize-api-performance/
Hi Anoop
You will be serving meta data from publishers and binary from dynamic media?
Thanks
Dipti
Thanks Dipti !
Yes, assets from Dynamic Media and Metadata from Publisher instance.
Third party portal is looking
Looking for pointers to design in more optimized and performance oriented.
Note: User don't want to use asset share commons portal.
Hi @Anoop_Garg
Addition to @poojac35931336 's response :
During off-peak hours, consider pre-generating responses and then caching them, either in memory cache or JCR, for complete sets of asset JSONs.
Thanks Arun ! Do you have any example which I can refer ?
Hi @Anoop_Garg
Sitemap generator is one of the example where sitemap generator by scheduler. https://experienceleague.adobe.com/docs/experience-manager-learn/sites/seo/sitemaps.html?lang=en
For memory cache you can use ACS Commons or guava cache https://www.linkedin.com/pulse/enhancing-aem-performance-http-cache-acs-commons-divanshu-goyal/
Views
Likes
Replies