I took over support for a PHP app that runs on Heroku. After analyzing the performance with New Relic, I'm noticing that the three bottles necks are the database and API calls to outside services.
With regard to Database: App is constantly calling the database to get list of ingredients and nutritional information for every http request. This is causing a huge bottle neck and previously no caching is implemented.
With regard to API Calls: We make tons of API calls when processing payment. Sometimes the gateways are slow and its another bottle necks.
I have never worked with memchaced, redis, or Heroku worker dynos/IronWorker. What would be the best practice going forward to encapsulate DB and API calls?
Thanks for the input.