By default Ibexa Platform’s comes with a performance that is suitable for small and medium traffic. However, if you want to scale your website, Ibexa Platform gives you many options to optimize your website for higher traffic.
Consider this article like your to-do checklist to provide rapid experience for your website users. Below you will find a list which is ordered by importance.
EVERY PROJECT IS DIFFERENT
This information is based on our developers’ experience with Ibexa Platform. You can implement it in every Ibexa Platform project, what’s more – most elements of this list can be implemented in other Symfony projects.
To-do list
1. Composer - use —optimize
flag to generate an optimized class map.
As a result, your PHP script will be lighter, and every request will process a lower amount of data doing exactly the same.
2. Use Varnish to reduce the number of requests to your PHP application and provide cached content instead.
It will create a separate layer for your application, which will store cached pages by URL. Caching and purging for content is fully supported in Ibexa Platform by default. Although configuration can take some time, it will reward you with the ability to handle more traffic on your website. Custom endpoints will need additional work – although caching can be easily managed by controlling headers in the HTTP response; you will need to specify exact places where you purge cache for your endpoint.
3. Enable opcache
for php-fpm/mod_php
, use php-fpm
instead of fast-cgi
for lower memory usage.
This way, you can create more processes to serve your website users concurrently.
4. Avoid using Virtual Machines.
However, if you have to, make sure you work on the same filesystem. It can slow down your application drastically. Using Virtual Machine, you can slow down your application by 10%.
5. Memory cache – use Redis for memory cache.
Although read performance is slower, overall performance wins due to operations invalidating the cache. Think about using Redis for persistence cache – it is a bit slower but allows your data to survive service interruptions.
6. Use Solr/Elasticsearch for search operations to reduce the number of queries to your DB.
These tools are powerful for text search and drastically improve performance for loading website content.
If your development time is limited, you can start with the list below:
- Composer classmap optimization
- Enable
opcache
- Redis configuration
- PHP version update
Implementation of the above elements can reduce request time even for 30%.
Acceleration of an e-commerce store can be a direct factor in the financial profits of running it. Remember, that it is important to take care of your website performance (here is an article, where we describe why the performance of e-stores matters). If you are interested in scaling your website, please leave us your contact details on this page.