Skip to main content
Version: 2.1.0

REGARDS storage microservice

Introduction

The Downloader microservice is developed using exactly the same source code as the Storage microservice.

The difference between the two microservices lies in the activation or non-activation of a downloader profile.

The “downloader” profile enables you to disable all Storage service functions that are not dedicated to downloading.

For example, in the FileReferenceController controller, the annotation below indicates that this REST controller is not active, and therefore the functionality is not enabled in the service.

@Profile({ "!downloader" })
@RestController
@RequestMapping(FileReferenceController.FILE_PATH)
public class FileReferenceController {
...
}

The downloader profile is enabled in the boostrap-downloader module, which represents the main module of the spring-boot downloader service.

This profile is simply not enabled in the boostrap-storage module, which represents the main module of the spring-boot storage service.

How to download a file

The microservice downloader offers a single functional endpoint: downloading a file.

Download scalability therefore depends solely on the size of the Jetty application server thread pool.

By default, the size of this pool is set to 200 in deployment inventories.

If you want to be able to do more downloads in parallel, you can deploy more instances of the service or increase the size of the pool as indicated in the installation manual.

To download files, this service only requires the unique key of the file to be downloaded, i.e. the file checksum.

Using this checksum, the service queries the database to retrieve the storage space where the file is located.

If the file is located on more than one storage space, the hot storage with the highest priority is selected first. If there is no hot storage, then the cold storage with the highest priority is selected.

Once the file storage space has been determined, the associated plugin is instantiated and the file upload interface is called.

As a reminder, the plugins used by the downloder service are the same as those used by the storage service. They are shared by both services on the same disk space during deployment.

The downloader service plugins can be consulted via the storage service plugins description page.