PaaS Support Coverage
- Best Practices for Configuring Liferay Cloud for Auto-Scaling Based on CPU
- Bitbucket/GitLabの統合をサポートしていますか?
- Configuring Remote Staging in Liferay PaaS
- Liferay Experience Cloud - セルフマネージド パフォーマンス/ペネトレーション テストの事前通知
- Liferay Experience Cloud 自己管理共有アクティビティ
- Liferay PaaS Security Checklist
- Liferay PaaS 本番稼働前チェックリスト
- Liferay Premium Security for PaaS
- オートスケーリングはどのように課金されますか?
- カスタムイメージとサービス
- データセンターはどこにありますか?
Best Practices for Configuring Liferay Cloud for Auto-Scaling Based on CPU
Introduction
Auto-scaling is a critical feature for managing resource utilization and ensuring the optimal performance of your applications in Liferay Cloud. While traditionally auto-scaling can be based on both CPU and memory thresholds, certain applications, especially those that are memory-intensive, can face inefficiencies with memory-based auto-scaling. This article will guide you through the best practices for configuring auto-scaling based on CPU utilization and discuss the benefits of upgrading to the latest Liferay version.
CPU-Based and Memory-Based Auto-Scaling
Some Liferay applications and the JVM are known for their memory-intensive nature. Configuring auto-scaling based on memory thresholds can sometimes lead to inefficiencies due to the JVM's behavior in memory allocation and deallocation. The JVM does not always release memory back to the operating system promptly, which can result in auto-scaled instances remaining active longer than necessary, driving up costs and complicating resource management.
By focusing on CPU utilization for auto-scaling, you can achieve a more responsive and cost-effective scaling behavior, better aligning with the performance needs of your applications. However, memory-based auto-scaling can still be effective for certain applications. For more information on configuring memory-based auto-scaling, please refer to the Liferay Cloud Auto-Scaling Documentation.
Configuration Steps
1. Update the LCP.json File
To configure auto-scaling based on CPU, you need to update the LCP.json file in your Liferay Cloud setup. Here is an example configuration:
{
"autoscale": {
"cpu": 60,
"memory": 95
}
}
In this setup, the auto-scaler will add more instances when CPU utilization reaches 60%. While memory is still a factor, it plays a secondary role to CPU utilization. For more information, please refer to Liferay Cloud Auto-Scaling Documentation.
2. Monitor and Adjust CPU Thresholds
Regularly monitor the CPU performance of your Liferay Cloud instances. Based on your application's load and performance profile, you might need to adjust the CPU threshold to achieve optimal scaling.
Benefits of Upgrading to the Latest Liferay Version
Upgrading to the latest version of Liferay offers numerous performance improvements and enhanced features. Some of the key benefits include:
- Improved Memory Management: Newer versions of Liferay come with optimized memory management, which can help reduce the inefficiencies caused by JVM memory allocation.
- Enhanced Performance: Each new release includes performance enhancements that can help your applications run more smoothly and efficiently.
- Advanced Features: Take advantage of the latest features and security updates that come with newer versions of Liferay.
Future Improvements in Auto-Scaling and Telemetry
We understand the limitations of current auto-scaling configurations and are actively working to enhance these capabilities. Here are some of the upcoming improvements:
- Custom Metrics for Auto-Scaling: Starting in late 2024, customers will be able to select custom metrics for auto-scaling. This will allow more granular control over scaling decisions, enabling users to tailor auto-scaling triggers based on specific application performance indicators.
- Enhanced Telemetry: We are integrating improved telemetry features to provide better insights and real-time visualizations for critical performance metrics, enabling better resource management and operational insights.
- Manual Horizontal Scaling: The new manual scaling feature will allow customers to actively and responsively scale their Liferay services during periods of anticipated increased traffic. This will help in managing sudden spikes in traffic more effectively.
These new features are expected to be released between Q3 and Q4 of 2024.
Conclusion
Configuring auto-scaling based on CPU utilization is an efficient approach for many Liferay Cloud environments. While memory-based scaling can be effective for certain applications, focusing on CPU thresholds ensures a more responsive and cost-effective scaling behavior for a broader range of scenarios. Upgrading to the latest Liferay version further enhances performance and takes advantage of the newest features. Stay tuned for upcoming improvements in auto-scaling configurations and telemetry, which will provide even greater control and insight into your application's performance.
For further assistance or questions, please reach out to our support team.