Skip to content

Martini Runtime Server Configuration Best Practices

Martini supports various configuration options, which can be applied through multiple methods and files. This page provides a comprehensive guide of the best practices for configuring your Martini instances effectively:

  1. Update System Encryption Key
    Regularly updating the system's encryption keys is crucial to protect sensitive data and prevent unauthorized access, ensuring ongoing security even if previous keys are compromised.

You can update system encryption key by following this documentation.

  1. Use Override Properties
    Utilizing override properties allows for flexible configuration adjustments without modifying the main configuration files, enhancing maintainability and environment-specific customization.

Learn more about using override.properties file in this documentation.

  1. Use Environmental Variables
    Environmental variables provide a secure way to manage sensitive configuration details such as passwords and API keys, keeping them out of the codebase and reducing the risk of exposure.

Steps on how to setup environmental variables can be viewed in this documentation.

  1. Mount the /martini Folder to Permanent Storage
    When using ephemeral storage systems such as Docker, it's essential to mount /martini to a permanent storage. This ensures data persistence across server reboots and deployments, which is crucial for maintaining data integrity and continuity of the application.

Learn more on how to mount /martini folder by viewing this documentation.

  1. Lock Down Production Servers
    Restricting file system access on production servers to essential personnel minimizes the risk of inadvertent or malicious alterations, safeguarding the operational stability of the environment.

To lock down production servers in Martini, you can follow this documentation.

  1. Process Logfiles with a Log Analysis Platform
    Using a log analysis platform such as AWS CloudWatch, Datadog, or Loggly to manage log files centralizes log processing and provides robust tools for analysis, reducing direct system access and enhancing security and operational oversight.

For detailed instructions on how to configure your log files, you can visit this page here.

  1. Use Cassandra or DynamoDB for the Tracker Database
    Opting for scalable, high-performance databases like Cassandra or DynamoDB for the Tracker database ensures efficient handling of large data volumes and supports high availability and resilience.

  2. Optimize Memory Allocation
    Whether deploying Martini instances on virtual machines or via Docker, it's important to optimize memory allocation to enhance performance. For virtual machines, adjusting the allocated memory according to the workload can improve efficiency. When using Docker, optimizing JVM memory management ensures optimal performance while preventing resource overuse.

To optimize the memory allocation of your Docker container you can follow this guide. For Martini instances deployed in a Virtual machine you can view this documentation.

These practices are designed to optimize the efficiency, security, and manageability of Martini, facilitating a stable and secure environment for all users and processes.