iconik Cloud Storage Architecture
iconik allows you to use your own cloud storage for storing original files, proxies or keyframes. To do this you configure a storage in iconik using credentials you generate using the storage vendor's administrative tools. This allows iconik to access the storage using these credentials and access information.
Terminology
This page uses the term pre-signed URLs throughout although this terminology only is used by Amazon S3 and Google Cloud Storage. The equivalent terms are Shared Access Signature for Azure Blob Storage and upload_url and Download URL for Backblaze B2.
Pre-signed URLs
The access credentials you configure in the storage settings are highly sensitive and usually gives complete control of all files in the storage. Because of this, access to these credentials are kept to a minimum. They are kept in encrypted storage and iconik only uses them internally.
Any external system which needs to access an object on a cloud storage has to request a URL using the APIs and will receive a pre-signed URL which can only be used to perform the specified operation and only on the object it requests access to. These pre-signed URLs are generated on demand but are cached for up to 24 hours for read-only operations, for performance reasons. The exact syntax for a pre-signed URL depends on the storage type but are generally
Presigned URLs are supported with all the storage vendors we support:
- AWS S3
- GCS
- Azure Blob
- Backblaze B2 download and upload
Search results
When searching in iconik's GUI, the search results page displays a preview image for each search result hit. This is called a keyframe and these are generated by the iconik transcoder on the initial ingest of a file into the system and are stored in a bucket of type Keyframe (either an iconik-managed bucket or a bring-your-own-bucket which is owned by the customer) The iconik search API responses optionally includes a link to a keyframe and a keyframe map representing a set of still frames of the asset. This is returned in the search result response to the client and client can then access the file via the object directly. In the iconik GUI this is used to display the search result pods. The client downloads the keyframe files directly from the cloud storage without going through the iconik SaaS service.
Displaying a proxy
When displaying an asset page, iconik shows a proxy version of the asset. This can be either a video, an audio file or a preview image depending on the asset type. In order to get the proxy, the web GUI first makes a call to iconik's assets API to get general metadata about the asset and then uses that information to request a pre-signed URL for the proxy itself. It then creates a media element in the browser's DOM which makes the browser download and display the proxy to the user. The client downloads the proxy file directly from the cloud storage without going through the iconik SaaS service.
Downloading a file
Downloading a file works very similarly to how a proxy is displayed. The client requests a pre-signed download URL for the file and then starts downloading it. The client may choose to download the file using concurrent connections using range requests if it wants to in order to increase the download speed.
Uploading a file
Uploading a file works the same no matter which client is uploading. This includes the web browser GUI, the iconik Agent, the iconik Storage Gateway and any custom client.
In order to upload a file to iconik the client starts by creating all the required objects, including asset, format, file_set and file. This is explained in our API tutorial and will not be reiterated here. Once the file object has been created the client can request an upload URL. This is a pre-signed URL (or multiple URLs for some storage types) which can only be used to upload to a specific path on the cloud storage. Next, the client splits the file it wants to upload into chunks and starts uploading using as many concurrent connections as configured in the client settings. Once it has uploaded the entire file it issues a final call to iconik's API to mark the file as closed to signal that the upload has finished.
Cloud Transcoder
The iconik cloud transcoder runs as a separate module in the iconik SaaS service. Even though it runs within the secure environment in iconik's backend it only uses pre-signed URLs in order to limit the risk of exposure to the storage credentials. When a transcode job is created it is queued internally in the iconik backend and when a free transcode slot is available the job is scheduled to a transcode node. The transcode process then fetches a pre-signed URL to download the source file, transcodes it to a temporary file. Once the transcode process is complete it uploads the resulting file to the proxy bucket and finally marks the proxy file as closed.
Edge Transcoder
The iconik Edge Transcoder is a variant of the iconik cloud transcoder which can be deployed to the customer's own cloud VMs. It can transcode files within the customer's VPC, without causing egress costs. The Edge Transcoder also uses pre-signed URLs in order to read data from the source file and to write data to the destination file.
Scanning a storage
In order to scan a cloud storage, iconik needs to communicate directly with the Storage API of the cloud storage service. To do this, iconik needs to use the access credentials directly. This cannot be done using pre-signed URLs in any of the cloud storage vendors we currently support. Because of this, scanning using the iconik Storage Gateway or Edge Transcoder is not possible. The scanner detects new file and creates assets, formats, filesets and files as needed. It also triggers transcodes if the scanner settings are configured to transcode on ingest.
Transfering between storages
iconik gives users the ability to move or copy files between storages. Exactly how this works depends on the type and location of the source and destination storage. All transfers between storages are initiated from the iconik SaaS service. For a description of transfers to and from iconik Storage Gateways, please see the Hybrid Cloud documentation.
Buckets in the same storage account
Transfers between two storages within the same storage account in S3, GCS, Azure or B2 are performed using the storage vendor's API calls to trigger a copy without downloading the file. The exact mechanism for this differs between different storage vendors but it all follows the general schematics below.
Between storage accounts or types
Transfers between storage accounts or storage types cannot be done server side in any of the storage types iconik supports. Instead, the iconik transfer system will download chunks of the file from the source storage and upload them to the destination storage. This means that there may be two egress costs, one for transferring the file from the source storage to iconik's SaaS service and one for transferring from iconik's SaaS service to the destination storage. The actual charges will depend on the policies of the various cloud service providers involved.
Private VPC storage
Certain Cloud Storage providers allow a cloud storage to be configured to only be reachable from within the customer's own VPC. This is for example supported on Amazon S3, Google Cloud Storage and Azure Blob Storage. It is possible to use iconik in these scenarios but with some limitations and care has to be taken to configure the settings correctly. Any client which accesses the storage has to access it via an allowed address, for example using a VPN connection or using network peering. For information on exactly how to configure this, please contact your cloud storage vendor.
iconik's SaaS service will not be able to connect to the cloud bucket so scanning and transcoding using the iconik Cloud Transcoder will not be possible. In order to support transcoding you will either have to perform all transcoding on an iconik Storage Gateway, use an Edge Transcoder which runs on a VM inside the VPC or use a 3rd-party transcoding service which has access to the buckets.