Python Cloud Hosting with Jelastic PaaS
FullHost.Cloud offers out-of-the-box integration with scalable Apache application servers specifically designed for Python-based applications. The platform is pre-optimized and ready for immediate management, allowing developers to focus on coding rather than managing orchestration tasks, making the hosting experience as seamless as possible.
In this article, you'll explore the key tools and features available on FullHost.Cloud to ensure reliable and scalable Python cloud hosting.
Python Environment Hosting
To host your Python application on FullHost.Cloud, create a new environment using the intuitive topology wizard (accessible through the New Environment button on the dashboard).
Switch to the Python tab, select your desired Python version, and the Apache Python application server with the mod_wsgi module will be automatically included. Configure your resource limits, the number of nodes, and any additional software stacks or options (such as Public IPs) as needed to complete your environment setup.
Python Versioning
FullHost.Cloud currently supports the following Python versions:
- Python 3.8.20
-
Python 3.9.19
-
Python 3.10.15
-
Python 3.11.10
-
Python 3.12.6
The available Python versions are regularly updated in the Software Stack Versions document.
You can select your desired Python version directly from the topology wizard when creating a new environment or adjust it for existing environments through container redeployment.
Python Application Deployment
Deployment to managed Apache Python servers on FullHost.Cloud is automated and can be done using one of the following methods:
- From a remote VCS repository (e.g., GitHub)
- Via an application archive uploaded from an external URL or your local machine
- These options provide flexibility and ease in managing your Python application deployments.
- Git flow allows for both sequential and simultaneous deployments, with the option for automatic re-deployment from the repository when new code changes are detected.
- For a detailed overview of the deployment process and additional options, refer to the following guides:
- Deployment Manager
- Deployment Guide
- Auto-Deploy Overview
- Deployment Hooks
These resources provide everything you need to streamline and automate your Python application deployments.
Python Packages and Modules Management
To deploy and run a Python application, you may need to install additional modules or packages. A common practice is to run Python web applications in isolated virtual environments using tools like virtualenv. This allows you to manage projects independently without requiring administrator privileges.
Connect to your Python environment via SSH (either through a local client or the built-in Web SSH client) and create a new virtual environment. Use the following commands:
- virtualenv {appName}
- source {appName}/bin/activate
- Package Management with pip
Python packages are typically managed using pip, a popular package management system for the Python Package Index (PyPI) repository. Below are some commonly used pip commands:
- pip install {packageName} – Installs a specific module
- pip uninstall {packageName} – Removes a previously installed module
- pip install –upgrade {packageName} – Updates the specified module to its latest version
- pip install -r requirements.txt – Installs all modules listed in the requirements.txt file
- pip list – Displays the list of currently installed modules
These commands simplify managing the dependencies required for your Python applications.
Domains Management
You can replace the default domain name of your Python application with a custom one by using the following methods:
- CNAME Redirect (for Shared Load Balancer): Recommended for development and testing environments.
- DNS A Record (for Public IP): Suitable for production environments, as it can handle higher traffic loads.
These options give you flexibility in managing domains for different stages of your application’s lifecycle.
In addition, FullHost.Cloud allows for quick, zero-downtime traffic switching between two environments (e.g., to seamlessly direct users to a new version of your application) using the swap domains feature or the SwapExtIps API/CLI method.
This ensures smooth transitions during updates or deployments without disrupting user access.
Automatic Vertical Scaling
FullHost.Cloud’s automatic vertical scaling ensures that your Python application receives exactly the resources (RAM and CPU) it needs at any given time, eliminating the need for manual adjustments. Combined with the Pay-as-You-Use pricing model, this ensures you only pay for the resources your application actually consumes, avoiding overpayment for unused capacity.
Simply set the upper limit for cloudlets (each cloudlet equals 128 MiB of RAM and 400 MHz of CPU) for your Python server, and the platform will handle the rest automatically.
Manual Horizontal Scaling
Scaling Python servers on FullHost.Cloud is as straightforward as with any other instance. Use the +/- buttons in the topology wizard to adjust the number of nodes. You can also choose between two scaling modes:
- Stateless – Simultaneously creates all new nodes from the base image template.
- Stateful – Sequentially copies the file system of the master container into the new nodes.
This flexibility allows you to scale your application according to your specific needs.
Tip: To ensure proper request distribution, a load balancer instance is automatically added to the environment when scaling Python servers. For more details, refer to the horizontal scaling documentation.
Automatic Horizontal Scaling
To set up automatic horizontal scaling, go to Settings > Auto Horizontal Scaling in your environment. There, you can create custom triggers that automatically adjust the number of nodes based on application load. Select the resource type to monitor (CPU, RAM, Network, Disk) and define the scaling conditions—the platform handles the rest.
If enabled, you’ll receive email notifications about any scaling changes.
Database Connection to Python Application
FullHost.Cloud offers a range of scalable, fully managed database servers that are easily integrated into your Python environment. To connect your application, follow the instructions based on the specific database you need:
- MySQL Connection
- MongoDB Connection
- Additionally, hosting on FullHost.Cloud provides access to a variety of built-in tools and features, including:
- Custom or Built-In SSL
- Public IPv4 and IPv6
- A wide selection of managed software stacks
- Container firewalls, endpoints, and environment isolation
- User-friendly UI and direct Web SSH access for management
- Open API and Cloud Scripting for automation
- Pay-as-you-use pricing model
- Collaboration features for teamwork
- Multi-cloud distribution
- Experience seamless and advanced Python cloud hosting with a free trial!