lucasocon / music-api-grape

Music Service API
2 stars 0 forks source link

performance tuning #6

Open alex-nexus opened 7 years ago

alex-nexus commented 7 years ago

For apis to get all albums and even one album, how would you tune the performance.

  1. query level
  2. caching level
lucasocon commented 7 years ago

For query level I used a gem called Lupa that allows to build scalable search filters and lets us create a custom query for each view For caching I like to use redis to store api responses and serve when the client make the request. if the records are updated, deleted or a new one is created the cache will be removed. Like a replica of the DB but much more faster. @alex-nexus

lucasocon commented 7 years ago

Api cache solved in PR #9 @alex-nexus