Alternatives to PHP-FPM logo

Alternatives to PHP-FPM

HHVM (HipHop Virtual Machine), PHP, NGINX, uWSGI, and MySQL are the most popular alternatives and competitors to PHP-FPM.
117
0

What is PHP-FPM and what are its top alternatives?

PHP-FPM, which stands for PHP FastCGI Process Manager, is a process manager designed to optimize and manage the execution of PHP scripts. It allows for better performance and scalability by processing PHP code as a separate processes rather than traditional CGI methods. Key features include process management, better performance, scalable architecture, and support for multiple pools for different websites. However, PHP-FPM may require additional configuration and monitoring, and its setup can be more complex compared to traditional PHP handlers like mod_php.

  1. HHVM: HHVM is an open-source virtual machine designed for executing programs written in PHP and Hack languages. Key features include Just-In-Time compilation, high performance, and support for PHP and Hack languages. Pros include improved performance over PHP-FPM, while cons may include compatibility issues with some PHP extensions.

  2. LiteSpeed Web Server + LSAPI: LiteSpeed Web Server with LSAPI is a high-performance web server with PHP support. Key features include LiteSpeed Cache, HTTP/3 support, and built-in security features. Pros include improved performance and scalability, while cons may include the need for a commercial license for certain features.

  3. Caddy Server: Caddy is an open-source web server with automatic HTTPS and support for PHP processing. Key features include automatic HTTPS configuration, easy deployment, and modular plugin system. Pros include user-friendly configuration, while cons may include compatibility issues with some PHP applications.

  4. OpenLiteSpeed + LSAPI: OpenLiteSpeed with LSAPI is a lightweight open-source web server with PHP support. Key features include performance optimization, LiteSpeed Cache, and HTTP/3 support. Pros include scalability and performance, while cons may include limited support compared to LiteSpeed Enterprise.

  5. Nginx + PHP-FastCGI: Nginx with PHP-FastCGI is a popular web server setup for processing PHP scripts. Key features include high performance, low resource consumption, and support for reverse proxy. Pros include scalability and performance, while cons may include complexity in configuration for beginners.

  6. Apache + mod_fastcgi: Apache web server with mod_fastcgi module allows for processing PHP scripts using FastCGI. Key features include flexibility, support for various programming languages, and extensive module ecosystem. Pros include compatibility with different applications, while cons may include higher resource consumption compared to Nginx.

  7. Lighttpd: Lighttpd is a lightweight open-source web server known for its speed and efficiency. Key features include low memory footprint, fast performance, and support for FastCGI. Pros include speed and efficiency, while cons may include limited module ecosystem compared to Apache or Nginx.

  8. Microsoft IIS + FastCGI: Microsoft Internet Information Services (IIS) with FastCGI module allows for running PHP scripts on Windows servers. Key features include Windows integration, support for PHP, and compatibility with ASP.NET applications. Pros include seamless integration with Windows environments, while cons may include licensing costs for Windows Server.

  9. Cherokee: Cherokee is a lightweight web server with FastCGI support and a user-friendly interface. Key features include simple configuration, extensibility through plugins, and scalability. Pros include ease of use, while cons may include limited community support compared to other solutions.

  10. H2O + mruby: H2O web server with mruby module allows for dynamic content processing with support for scripting languages like Ruby. Key features include performance optimization, scripting language support, and HTTP/2 compatibility. Pros include flexibility, while cons may include limited documentation compared to more established solutions.

Top Alternatives to PHP-FPM

  • HHVM (HipHop Virtual Machine)
    HHVM (HipHop Virtual Machine)

    HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to. To date, HHVM (and its predecessor HPHPc before it) has realized over a 9x increase in web request throughput and over a 5x reduction in memory consumption for Facebook compared with the PHP 5.2 engine + APC. ...

  • PHP
    PHP

    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world. ...

  • NGINX
    NGINX

    nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server, written by Igor Sysoev. According to Netcraft nginx served or proxied 30.46% of the top million busiest sites in Jan 2018. ...

  • uWSGI
    uWSGI

    The uWSGI project aims at developing a full stack for building hosting services. ...

  • MySQL
    MySQL

    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. ...

  • PostgreSQL
    PostgreSQL

    PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. ...

  • MongoDB
    MongoDB

    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding. ...

  • Redis
    Redis

    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. ...

PHP-FPM alternatives & related posts

HHVM (HipHop Virtual Machine) logo

HHVM (HipHop Virtual Machine)

145
135
95
An open-source virtual machine designed for executing programs written in Hack and PHP
145
135
+ 1
95
PROS OF HHVM (HIPHOP VIRTUAL MACHINE)
  • 30
    Very fast
  • 24
    Drop-in PHP replacement
  • 14
    Works well with nginx
  • 14
    Backed by Facebook
  • 12
    Open source
  • 1
    Statically checked, typed language
CONS OF HHVM (HIPHOP VIRTUAL MACHINE)
    Be the first to leave a con

    related HHVM (HipHop Virtual Machine) posts

    Since the beginning, Cal Henderson has been the CTO of Slack. Earlier this year, he commented on a Quora question summarizing their current stack.

    Apps
    • Web: a mix of JavaScript/ES6 and React.
    • Desktop: And Electron to ship it as a desktop application.
    • Android: a mix of Java and Kotlin.
    • iOS: written in a mix of Objective C and Swift.
    Backend
    • The core application and the API written in PHP/Hack that runs on HHVM.
    • The data is stored in MySQL using Vitess.
    • Caching is done using Memcached and MCRouter.
    • The search service takes help from SolrCloud, with various Java services.
    • The messaging system uses WebSockets with many services in Java and Go.
    • Load balancing is done using HAproxy with Consul for configuration.
    • Most services talk to each other over gRPC,
    • Some Thrift and JSON-over-HTTP
    • Voice and video calling service was built in Elixir.
    Data warehouse
    • Built using open source tools including Presto, Spark, Airflow, Hadoop and Kafka.
    Etc
    See more
    PHP logo

    PHP

    144.2K
    81.1K
    4.6K
    A popular general-purpose scripting language that is especially suited to web development
    144.2K
    81.1K
    + 1
    4.6K
    PROS OF PHP
    • 953
      Large community
    • 819
      Open source
    • 767
      Easy deployment
    • 487
      Great frameworks
    • 387
      The best glue on the web
    • 235
      Continual improvements
    • 185
      Good old web
    • 145
      Web foundation
    • 135
      Community packages
    • 125
      Tool support
    • 35
      Used by wordpress
    • 34
      Excellent documentation
    • 29
      Used by Facebook
    • 23
      Because of Symfony
    • 21
      Dynamic Language
    • 17
      Easy to learn
    • 17
      Cheap hosting
    • 15
      Very powerful web language
    • 14
      Awesome Language and easy to implement
    • 14
      Fast development
    • 14
      Because of Laravel
    • 13
      Composer
    • 12
      Flexibility, syntax, extensibility
    • 9
      Easiest deployment
    • 8
      Readable Code
    • 8
      Fast
    • 7
      Short development lead times
    • 7
      Most of the web uses it
    • 7
      Worst popularity quality ratio
    • 7
      Fastestest Time to Version 1.0 Deployments
    • 6
      Simple, flexible yet Scalable
    • 6
      Faster then ever
    • 5
      Open source and large community
    • 4
      Cheap to own
    • 4
      Has the best ecommerce(Magento,Prestashop,Opencart,etc)
    • 4
      Is like one zip of air
    • 4
      Open source and great framework
    • 4
      Large community, easy setup, easy deployment, framework
    • 4
      Easy to use and learn
    • 4
      Easy to learn, a big community, lot of frameworks
    • 4
      Great developer experience
    • 4
      I have no choice :(
    • 2
      Hard not to use
    • 2
      Walk away
    • 2
      Interpreted at the run time
    • 2
      FFI
    • 2
      Safe the planet
    • 2
      Used by STOMT
    • 2
      Fault tolerance
    • 2
      Great flexibility. From fast prototyping to large apps
    • 1
      Simplesaml
    • 1
      Bando
    • 1
      Secure
    • 1
      It can get you a lamborghini
    • 0
      Secure
    CONS OF PHP
    • 22
      So easy to learn, good practices are hard to find
    • 16
      Inconsistent API
    • 8
      Fragmented community
    • 6
      Not secure
    • 3
      No routing system
    • 3
      Hard to debug
    • 2
      Old

    related PHP posts

    Nick Rockwell
    SVP, Engineering at Fastly · | 46 upvotes · 4.1M views

    When I joined NYT there was already broad dissatisfaction with the LAMP (Linux Apache HTTP Server MySQL PHP) Stack and the front end framework, in particular. So, I wasn't passing judgment on it. I mean, LAMP's fine, you can do good work in LAMP. It's a little dated at this point, but it's not ... I didn't want to rip it out for its own sake, but everyone else was like, "We don't like this, it's really inflexible." And I remember from being outside the company when that was called MIT FIVE when it had launched. And been observing it from the outside, and I was like, you guys took so long to do that and you did it so carefully, and yet you're not happy with your decisions. Why is that? That was more the impetus. If we're going to do this again, how are we going to do it in a way that we're gonna get a better result?

    So we're moving quickly away from LAMP, I would say. So, right now, the new front end is React based and using Apollo. And we've been in a long, protracted, gradual rollout of the core experiences.

    React is now talking to GraphQL as a primary API. There's a Node.js back end, to the front end, which is mainly for server-side rendering, as well.

    Behind there, the main repository for the GraphQL server is a big table repository, that we call Bodega because it's a convenience store. And that reads off of a Kafka pipeline.

    See more
    Simon Reymann
    Senior Fullstack Developer at QUANTUSflow Software GmbH · | 27 upvotes · 5.1M views

    Our whole Node.js backend stack consists of the following tools:

    • Lerna as a tool for multi package and multi repository management
    • npm as package manager
    • NestJS as Node.js framework
    • TypeScript as programming language
    • ExpressJS as web server
    • Swagger UI for visualizing and interacting with the API’s resources
    • Postman as a tool for API development
    • TypeORM as object relational mapping layer
    • JSON Web Token for access token management

    The main reason we have chosen Node.js over PHP is related to the following artifacts:

    • Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
    • Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
    • A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
    • Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
    See more
    NGINX logo

    NGINX

    113.3K
    60.9K
    5.5K
    A high performance free open source web server powering busiest sites on the Internet.
    113.3K
    60.9K
    + 1
    5.5K
    PROS OF NGINX
    • 1.4K
      High-performance http server
    • 894
      Performance
    • 730
      Easy to configure
    • 607
      Open source
    • 530
      Load balancer
    • 289
      Free
    • 288
      Scalability
    • 226
      Web server
    • 175
      Simplicity
    • 136
      Easy setup
    • 30
      Content caching
    • 21
      Web Accelerator
    • 15
      Capability
    • 14
      Fast
    • 12
      High-latency
    • 12
      Predictability
    • 8
      Reverse Proxy
    • 7
      The best of them
    • 7
      Supports http/2
    • 5
      Great Community
    • 5
      Lots of Modules
    • 5
      Enterprise version
    • 4
      High perfomance proxy server
    • 3
      Embedded Lua scripting
    • 3
      Streaming media delivery
    • 3
      Streaming media
    • 3
      Reversy Proxy
    • 2
      Blash
    • 2
      GRPC-Web
    • 2
      Lightweight
    • 2
      Fast and easy to set up
    • 2
      Slim
    • 2
      saltstack
    • 1
      Virtual hosting
    • 1
      Narrow focus. Easy to configure. Fast
    • 1
      Along with Redis Cache its the Most superior
    • 1
      Ingress controller
    CONS OF NGINX
    • 10
      Advanced features require subscription

    related NGINX posts

    Simon Reymann
    Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.1M views

    Our whole DevOps stack consists of the following tools:

    • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
    • Respectively Git as revision control system
    • SourceTree as Git GUI
    • Visual Studio Code as IDE
    • CircleCI for continuous integration (automatize development process)
    • Prettier / TSLint / ESLint as code linter
    • SonarQube as quality gate
    • Docker as container management (incl. Docker Compose for multi-container application management)
    • VirtualBox for operating system simulation tests
    • Kubernetes as cluster management for docker containers
    • Heroku for deploying in test environments
    • nginx as web server (preferably used as facade server in production environment)
    • SSLMate (using OpenSSL) for certificate management
    • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
    • PostgreSQL as preferred database system
    • Redis as preferred in-memory database/store (great for caching)

    The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

    • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
    • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
    • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
    • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
    • Scalability: All-in-one framework for distributed systems.
    • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
    See more
    John-Daniel Trask
    Co-founder & CEO at Raygun · | 19 upvotes · 287.5K views

    We chose AWS because, at the time, it was really the only cloud provider to choose from.

    We tend to use their basic building blocks (EC2, ELB, Amazon S3, Amazon RDS) rather than vendor specific components like databases and queuing. We deliberately decided to do this to ensure we could provide multi-cloud support or potentially move to another cloud provider if the offering was better for our customers.

    We’ve utilized c3.large nodes for both the Node.js deployment and then for the .NET Core deployment. Both sit as backends behind an nginx instance and are managed using scaling groups in Amazon EC2 sitting behind a standard AWS Elastic Load Balancing (ELB).

    While we’re satisfied with AWS, we do review our decision each year and have looked at Azure and Google Cloud offerings.

    #CloudHosting #WebServers #CloudStorage #LoadBalancerReverseProxy

    See more
    uWSGI logo

    uWSGI

    256
    311
    12
    uWSGI application server container
    256
    311
    + 1
    12
    PROS OF UWSGI
    • 6
      Faster
    • 4
      Simple
    • 2
      Powerful
    CONS OF UWSGI
      Be the first to leave a con

      related uWSGI posts

      I find I really like using GitHub because its issue tracker integrates really well into my project flow and the projects feature allows me to organize different efforts into boards. The automation features allow my issues to automatically progress through some states on the boards when I merge pull requests.

      My Python / Django app is deployed on Heroku with PostgreSQL database and uWSGI webserver.

      See more

      I use Gunicorn because does one thing - it’s a WSGI HTTP server - and it does it well. Deploy it quickly and easily, and let the rest of your stack do what the rest of your stack does well, wherever that may be.

      uWSGI “aims at developing a full stack for building hosting services” - if that’s a thing you need then ok, but I like the principle of doing one thing well, and I deploy to platforms like Heroku and AWS Elastic Beanstalk where the rest of the “hosting service” is provided and managed for me.

      See more
      MySQL logo

      MySQL

      125.2K
      105.9K
      3.8K
      The world's most popular open source database
      125.2K
      105.9K
      + 1
      3.8K
      PROS OF MYSQL
      • 800
        Sql
      • 679
        Free
      • 562
        Easy
      • 528
        Widely used
      • 490
        Open source
      • 180
        High availability
      • 160
        Cross-platform support
      • 104
        Great community
      • 79
        Secure
      • 75
        Full-text indexing and searching
      • 26
        Fast, open, available
      • 16
        Reliable
      • 16
        SSL support
      • 15
        Robust
      • 9
        Enterprise Version
      • 7
        Easy to set up on all platforms
      • 3
        NoSQL access to JSON data type
      • 1
        Relational database
      • 1
        Easy, light, scalable
      • 1
        Sequel Pro (best SQL GUI)
      • 1
        Replica Support
      CONS OF MYSQL
      • 16
        Owned by a company with their own agenda
      • 3
        Can't roll back schema changes

      related MySQL posts

      Nick Rockwell
      SVP, Engineering at Fastly · | 46 upvotes · 4.1M views

      When I joined NYT there was already broad dissatisfaction with the LAMP (Linux Apache HTTP Server MySQL PHP) Stack and the front end framework, in particular. So, I wasn't passing judgment on it. I mean, LAMP's fine, you can do good work in LAMP. It's a little dated at this point, but it's not ... I didn't want to rip it out for its own sake, but everyone else was like, "We don't like this, it's really inflexible." And I remember from being outside the company when that was called MIT FIVE when it had launched. And been observing it from the outside, and I was like, you guys took so long to do that and you did it so carefully, and yet you're not happy with your decisions. Why is that? That was more the impetus. If we're going to do this again, how are we going to do it in a way that we're gonna get a better result?

      So we're moving quickly away from LAMP, I would say. So, right now, the new front end is React based and using Apollo. And we've been in a long, protracted, gradual rollout of the core experiences.

      React is now talking to GraphQL as a primary API. There's a Node.js back end, to the front end, which is mainly for server-side rendering, as well.

      Behind there, the main repository for the GraphQL server is a big table repository, that we call Bodega because it's a convenience store. And that reads off of a Kafka pipeline.

      See more
      Tim Abbott

      We've been using PostgreSQL since the very early days of Zulip, but we actually didn't use it from the beginning. Zulip started out as a MySQL project back in 2012, because we'd heard it was a good choice for a startup with a wide community. However, we found that even though we were using the Django ORM for most of our database access, we spent a lot of time fighting with MySQL. Issues ranged from bad collation defaults, to bad query plans which required a lot of manual query tweaks.

      We ended up getting so frustrated that we tried out PostgresQL, and the results were fantastic. We didn't have to do any real customization (just some tuning settings for how big a server we had), and all of our most important queries were faster out of the box. As a result, we were able to delete a bunch of custom queries escaping the ORM that we'd written to make the MySQL query planner happy (because postgres just did the right thing automatically).

      And then after that, we've just gotten a ton of value out of postgres. We use its excellent built-in full-text search, which has helped us avoid needing to bring in a tool like Elasticsearch, and we've really enjoyed features like its partial indexes, which saved us a lot of work adding unnecessary extra tables to get good performance for things like our "unread messages" and "starred messages" indexes.

      I can't recommend it highly enough.

      See more
      PostgreSQL logo

      PostgreSQL

      98.2K
      82.2K
      3.5K
      A powerful, open source object-relational database system
      98.2K
      82.2K
      + 1
      3.5K
      PROS OF POSTGRESQL
      • 763
        Relational database
      • 510
        High availability
      • 439
        Enterprise class database
      • 383
        Sql
      • 304
        Sql + nosql
      • 173
        Great community
      • 147
        Easy to setup
      • 131
        Heroku
      • 130
        Secure by default
      • 113
        Postgis
      • 50
        Supports Key-Value
      • 48
        Great JSON support
      • 34
        Cross platform
      • 33
        Extensible
      • 28
        Replication
      • 26
        Triggers
      • 23
        Multiversion concurrency control
      • 23
        Rollback
      • 21
        Open source
      • 18
        Heroku Add-on
      • 17
        Stable, Simple and Good Performance
      • 15
        Powerful
      • 13
        Lets be serious, what other SQL DB would you go for?
      • 11
        Good documentation
      • 9
        Scalable
      • 8
        Free
      • 8
        Reliable
      • 8
        Intelligent optimizer
      • 7
        Transactional DDL
      • 7
        Modern
      • 6
        One stop solution for all things sql no matter the os
      • 5
        Relational database with MVCC
      • 5
        Faster Development
      • 4
        Full-Text Search
      • 4
        Developer friendly
      • 3
        Excellent source code
      • 3
        Free version
      • 3
        Great DB for Transactional system or Application
      • 3
        Relational datanbase
      • 3
        search
      • 3
        Open-source
      • 2
        Text
      • 2
        Full-text
      • 1
        Can handle up to petabytes worth of size
      • 1
        Composability
      • 1
        Multiple procedural languages supported
      • 0
        Native
      CONS OF POSTGRESQL
      • 10
        Table/index bloatings

      related PostgreSQL posts

      Simon Reymann
      Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.1M views

      Our whole DevOps stack consists of the following tools:

      • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
      • Respectively Git as revision control system
      • SourceTree as Git GUI
      • Visual Studio Code as IDE
      • CircleCI for continuous integration (automatize development process)
      • Prettier / TSLint / ESLint as code linter
      • SonarQube as quality gate
      • Docker as container management (incl. Docker Compose for multi-container application management)
      • VirtualBox for operating system simulation tests
      • Kubernetes as cluster management for docker containers
      • Heroku for deploying in test environments
      • nginx as web server (preferably used as facade server in production environment)
      • SSLMate (using OpenSSL) for certificate management
      • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
      • PostgreSQL as preferred database system
      • Redis as preferred in-memory database/store (great for caching)

      The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

      • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
      • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
      • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
      • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
      • Scalability: All-in-one framework for distributed systems.
      • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
      See more
      Jeyabalaji Subramanian

      Recently we were looking at a few robust and cost-effective ways of replicating the data that resides in our production MongoDB to a PostgreSQL database for data warehousing and business intelligence.

      We set ourselves the following criteria for the optimal tool that would do this job: - The data replication must be near real-time, yet it should NOT impact the production database - The data replication must be horizontally scalable (based on the load), asynchronous & crash-resilient

      Based on the above criteria, we selected the following tools to perform the end to end data replication:

      We chose MongoDB Stitch for picking up the changes in the source database. It is the serverless platform from MongoDB. One of the services offered by MongoDB Stitch is Stitch Triggers. Using stitch triggers, you can execute a serverless function (in Node.js) in real time in response to changes in the database. When there are a lot of database changes, Stitch automatically "feeds forward" these changes through an asynchronous queue.

      We chose Amazon SQS as the pipe / message backbone for communicating the changes from MongoDB to our own replication service. Interestingly enough, MongoDB stitch offers integration with AWS services.

      In the Node.js function, we wrote minimal functionality to communicate the database changes (insert / update / delete / replace) to Amazon SQS.

      Next we wrote a minimal micro-service in Python to listen to the message events on SQS, pickup the data payload & mirror the DB changes on to the target Data warehouse. We implemented source data to target data translation by modelling target table structures through SQLAlchemy . We deployed this micro-service as AWS Lambda with Zappa. With Zappa, deploying your services as event-driven & horizontally scalable Lambda service is dumb-easy.

      In the end, we got to implement a highly scalable near realtime Change Data Replication service that "works" and deployed to production in a matter of few days!

      See more
      MongoDB logo

      MongoDB

      93.5K
      80.7K
      4.1K
      The database for giant ideas
      93.5K
      80.7K
      + 1
      4.1K
      PROS OF MONGODB
      • 828
        Document-oriented storage
      • 593
        No sql
      • 553
        Ease of use
      • 464
        Fast
      • 410
        High performance
      • 255
        Free
      • 218
        Open source
      • 180
        Flexible
      • 145
        Replication & high availability
      • 112
        Easy to maintain
      • 42
        Querying
      • 39
        Easy scalability
      • 38
        Auto-sharding
      • 37
        High availability
      • 31
        Map/reduce
      • 27
        Document database
      • 25
        Easy setup
      • 25
        Full index support
      • 16
        Reliable
      • 15
        Fast in-place updates
      • 14
        Agile programming, flexible, fast
      • 12
        No database migrations
      • 8
        Easy integration with Node.Js
      • 8
        Enterprise
      • 6
        Enterprise Support
      • 5
        Great NoSQL DB
      • 4
        Support for many languages through different drivers
      • 3
        Schemaless
      • 3
        Aggregation Framework
      • 3
        Drivers support is good
      • 2
        Fast
      • 2
        Managed service
      • 2
        Easy to Scale
      • 2
        Awesome
      • 2
        Consistent
      • 1
        Good GUI
      • 1
        Acid Compliant
      CONS OF MONGODB
      • 6
        Very slowly for connected models that require joins
      • 3
        Not acid compliant
      • 2
        Proprietary query language

      related MongoDB posts

      Jeyabalaji Subramanian

      Recently we were looking at a few robust and cost-effective ways of replicating the data that resides in our production MongoDB to a PostgreSQL database for data warehousing and business intelligence.

      We set ourselves the following criteria for the optimal tool that would do this job: - The data replication must be near real-time, yet it should NOT impact the production database - The data replication must be horizontally scalable (based on the load), asynchronous & crash-resilient

      Based on the above criteria, we selected the following tools to perform the end to end data replication:

      We chose MongoDB Stitch for picking up the changes in the source database. It is the serverless platform from MongoDB. One of the services offered by MongoDB Stitch is Stitch Triggers. Using stitch triggers, you can execute a serverless function (in Node.js) in real time in response to changes in the database. When there are a lot of database changes, Stitch automatically "feeds forward" these changes through an asynchronous queue.

      We chose Amazon SQS as the pipe / message backbone for communicating the changes from MongoDB to our own replication service. Interestingly enough, MongoDB stitch offers integration with AWS services.

      In the Node.js function, we wrote minimal functionality to communicate the database changes (insert / update / delete / replace) to Amazon SQS.

      Next we wrote a minimal micro-service in Python to listen to the message events on SQS, pickup the data payload & mirror the DB changes on to the target Data warehouse. We implemented source data to target data translation by modelling target table structures through SQLAlchemy . We deployed this micro-service as AWS Lambda with Zappa. With Zappa, deploying your services as event-driven & horizontally scalable Lambda service is dumb-easy.

      In the end, we got to implement a highly scalable near realtime Change Data Replication service that "works" and deployed to production in a matter of few days!

      See more
      Robert Zuber

      We use MongoDB as our primary #datastore. Mongo's approach to replica sets enables some fantastic patterns for operations like maintenance, backups, and #ETL.

      As we pull #microservices from our #monolith, we are taking the opportunity to build them with their own datastores using PostgreSQL. We also use Redis to cache data we’d never store permanently, and to rate-limit our requests to partners’ APIs (like GitHub).

      When we’re dealing with large blobs of immutable data (logs, artifacts, and test results), we store them in Amazon S3. We handle any side-effects of S3’s eventual consistency model within our own code. This ensures that we deal with user requests correctly while writes are in process.

      See more
      Redis logo

      Redis

      59.4K
      45.6K
      3.9K
      Open source (BSD licensed), in-memory data structure store
      59.4K
      45.6K
      + 1
      3.9K
      PROS OF REDIS
      • 886
        Performance
      • 542
        Super fast
      • 513
        Ease of use
      • 444
        In-memory cache
      • 324
        Advanced key-value cache
      • 194
        Open source
      • 182
        Easy to deploy
      • 164
        Stable
      • 155
        Free
      • 121
        Fast
      • 42
        High-Performance
      • 40
        High Availability
      • 35
        Data Structures
      • 32
        Very Scalable
      • 24
        Replication
      • 22
        Great community
      • 22
        Pub/Sub
      • 19
        "NoSQL" key-value data store
      • 16
        Hashes
      • 13
        Sets
      • 11
        Sorted Sets
      • 10
        NoSQL
      • 10
        Lists
      • 9
        Async replication
      • 9
        BSD licensed
      • 8
        Bitmaps
      • 8
        Integrates super easy with Sidekiq for Rails background
      • 7
        Keys with a limited time-to-live
      • 7
        Open Source
      • 6
        Lua scripting
      • 6
        Strings
      • 5
        Awesomeness for Free
      • 5
        Hyperloglogs
      • 4
        Transactions
      • 4
        Outstanding performance
      • 4
        Runs server side LUA
      • 4
        LRU eviction of keys
      • 4
        Feature Rich
      • 4
        Written in ANSI C
      • 4
        Networked
      • 3
        Data structure server
      • 3
        Performance & ease of use
      • 2
        Dont save data if no subscribers are found
      • 2
        Automatic failover
      • 2
        Easy to use
      • 2
        Temporarily kept on disk
      • 2
        Scalable
      • 2
        Existing Laravel Integration
      • 2
        Channels concept
      • 2
        Object [key/value] size each 500 MB
      • 2
        Simple
      CONS OF REDIS
      • 15
        Cannot query objects directly
      • 3
        No secondary indexes for non-numeric data types
      • 1
        No WAL

      related Redis posts

      Russel Werner
      Lead Engineer at StackShare · | 32 upvotes · 2.8M views

      StackShare Feed is built entirely with React, Glamorous, and Apollo. One of our objectives with the public launch of the Feed was to enable a Server-side rendered (SSR) experience for our organic search traffic. When you visit the StackShare Feed, and you aren't logged in, you are delivered the Trending feed experience. We use an in-house Node.js rendering microservice to generate this HTML. This microservice needs to run and serve requests independent of our Rails web app. Up until recently, we had a mono-repo with our Rails and React code living happily together and all served from the same web process. In order to deploy our SSR app into a Heroku environment, we needed to split out our front-end application into a separate repo in GitHub. The driving factor in this decision was mostly due to limitations imposed by Heroku specifically with how processes can't communicate with each other. A new SSR app was created in Heroku and linked directly to the frontend repo so it stays in-sync with changes.

      Related to this, we need a way to "deploy" our frontend changes to various server environments without building & releasing the entire Ruby application. We built a hybrid Amazon S3 Amazon CloudFront solution to host our Webpack bundles. A new CircleCI script builds the bundles and uploads them to S3. The final step in our rollout is to update some keys in Redis so our Rails app knows which bundles to serve. The result of these efforts were significant. Our frontend team now moves independently of our backend team, our build & release process takes only a few minutes, we are now using an edge CDN to serve JS assets, and we have pre-rendered React pages!

      #StackDecisionsLaunch #SSR #Microservices #FrontEndRepoSplit

      See more
      Simon Reymann
      Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.1M views

      Our whole DevOps stack consists of the following tools:

      • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
      • Respectively Git as revision control system
      • SourceTree as Git GUI
      • Visual Studio Code as IDE
      • CircleCI for continuous integration (automatize development process)
      • Prettier / TSLint / ESLint as code linter
      • SonarQube as quality gate
      • Docker as container management (incl. Docker Compose for multi-container application management)
      • VirtualBox for operating system simulation tests
      • Kubernetes as cluster management for docker containers
      • Heroku for deploying in test environments
      • nginx as web server (preferably used as facade server in production environment)
      • SSLMate (using OpenSSL) for certificate management
      • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
      • PostgreSQL as preferred database system
      • Redis as preferred in-memory database/store (great for caching)

      The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

      • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
      • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
      • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
      • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
      • Scalability: All-in-one framework for distributed systems.
      • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
      See more