From the UNA Wiki we read about remote video transcoding: Install UNA on separate server(s), but connect to the same DB which your main site is using.
What does a path for this connection like this look like, using example.com as the main UNA server instance?
Does this path belong in the inc/header file of the remote server along with similar transcoding settings? Where might that be?
Comments
Morning will this help you at all https://unacms.com/wiki/Video-Transcoder
In this architecture, video storage is separated from the main application by hosting it on a dedicated server or NAS cluster. This centralized "storage folder" serves as a repository for all video files and is accessible to both the main UNA site and multiple video transcoding servers. This separation ensures that heavy processing tasks like video transcoding are offloaded from the primary application, thereby improving overall performance and scalability.
Key Architectural Components
Dedicated Video Storage
All video files are stored in a centralized folder on a separate server or NAS cluster. This approach enables high availability and centralized management of video assets. Both the main UNA application and dedicated video transcoding servers can consistently access this shared storage. Several storage solutions are available, depending on your needs for scalability, performance, and availability:
cifs-utils
.For scalability and fast access to video files across multiple servers, OpenStack Manila (for structured shared file storage) and Ceph are among the most robust solutions for large and complex environments. For simpler setups, NFS and CIFS/SMB might suffice, while Amazon S3 is ideal for cloud storage if you’re already using AWS.
Mounting a Shared Folder to
/opt/una/storage
Before creating a new mount point, it is essential to back up the existing
/opt/una/storage
folder. This ensures that no data is lost during the transition. This process should be performed on both the main server and any video transcoding servers.General Steps (Applicable for Both NFS and CIFS/SMB):
storage
folder to a backup location:sudo mount -t nfs <NAS_IP>:/path/to/shared_folder /opt/una/storage
/etc/fstab
to mount automatically at boot:<NAS_IP>:/path/to/shared_folder /opt/una/storage nfs defaults 0 0
sudo mount -t cifs //<NAS_IP>/<Share_Name> /opt/una/storage -o username=<Username>,password=<Password>,uid=$(id -u),gid=$(id -g)
/etc/fstab
://<NAS_IP>/<Share_Name> /opt/una/storage cifs username=<Username>,password=<Password>,uid=$(id -u),gid=$(id -g) 0 0
/opt/una/storage
:sudo rsync -av /opt/una/storage_bak/ /opt/una/storage/
diff -r
). Once verified, you may optionally remove the backup:Required Modifications on UNA Servers
Both the main UNA server and the video transcoding servers (e.g.,
video1.example.com
,video2.example.com
, etc.) are nearly identical clones. However, you must make a small modification in theheader.inc.php
file on each server to differentiate them from the main site. This adjustment is crucial for proper configuration of each instance. For more details, please refer to the Video Transcoder Wiki.Network Isolation for Video Transcoding Servers
For enhanced security and performance, video transcoding servers should run exclusively within the private network and must not be directly accessible from the public internet. This isolation ensures that these servers are dedicated solely to processing tasks and are shielded from potential external threats, while the main UNA server remains publicly accessible.
Storage Solutions for Containerized Environments
For complex, containerized environments (using Docker Swarm or Kubernetes), consider these advanced storage solutions:
Final Note on Database Connectivity
In this architecture, all video transcoding servers and the main UNA server connect to the same centralized MySQL cluster. This ensures that metadata, user information, and other critical data remain consistent across the entire system. To connect to the database edit the file header.inc.php file, all servers must contain this file in /opt/una/inc/header.inc.php
This architecture optimizes resource utilization by separating storage, processing, and distribution tasks while ensuring scalability and high availability through redundancy. The process involves first backing up the existing
/opt/una/storage
folder, then creating a new mount point, mounting the shared storage, and finally restoring your files. Additionally, modifications in theheader.inc.php
file on both the main and video transcoding servers are necessary for proper configuration. Video transcoding servers should operate exclusively within the private network for security reasons, and all servers connect to the same centralized MySQL cluster, ensuring consistent data across the system.Make a full backup of your files and database before starting this process.
Happy coding!