Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

12 Factor App Methodology

Sumit Rawal answered on September 1, 2023 Popularity 7/10 Helpfulness 1/10

Contents


More Related Answers

  • Do you know the 12-factor methodology to build a microservice?
  • 12 factor application
  • 12 factor app
  • 12 factor app
  • Good design principles for microservices, the 12-factor app:
  • 12 factor app

  • 12 Factor App Methodology

    0

    Codebase: Maintain a single codebase in a version control system (e.g., Git) and use it for multiple deployments across different environments (development, staging, production).

    Dependencies: Explicitly declare and isolate dependencies. Avoid relying on system-wide libraries and ensure that all required dependencies are defined in the application's configuration.

    Config: Store configuration settings (e.g., database credentials, API keys) in environment variables or configuration files, separate from the codebase. This allows for easy configuration changes without code modifications.

    Backing Services: Treat backing services (databases, message queues, caches) as attached resources. The connection information and credentials for these services should be configurable externally, not hard-coded.

    Build, Release, Run: Separate the build, release, and run stages of deployment. This means creating distinct steps for building the application, releasing it with its configuration, and running it in the desired environment.

    Processes: Run the application as one or more stateless processes that share nothing. Avoid storing session state or data on the application server. Use external data stores or services for stateful operations.

    Port Binding: Export services via a well-defined port binding. The application should be self-contained and listen on a specific port, making it easy to expose externally.

    Concurrency: Scale the application by adding more process instances (horizontal scaling) rather than relying on vertical scaling. Each process instance should be stateless and independently scalable.

    Disposability: Design the application for quick and graceful shutdown. Use stateless processes and handle the termination of processes gracefully to ensure a smooth scaling and deployment experience.

    Dev/Prod Parity: Keep development, staging, and production environments as similar as possible. Use the same dependencies, configuration, and environment as much as possible to minimize deployment-related issues.

    Logs: Treat logs as event streams. Log output should be treated as a continuous stream of data that can be easily collected, aggregated, and analyzed. Avoid writing to local files or relying on non-streaming log mechanisms.

    Admin Processes: Run administrative tasks as one-off processes. Use a separate code path for running one-time or periodic administrative tasks (e.g., database migrations) instead of adding them to the application code.

    The "12 Factor App" methodology is not limited to a specific programming language or framework but provides general guidelines for building applications that are highly portable, maintainable, and scalable. Adopting these principles can help developers and teams build resilient and cloud-ready applications that are well-suited for modern infrastructure and deployment practices. 

    Popularity 7/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Sep 01 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.