What is FCM?

Firebase Cloud Messaging (FCM) is a handy platform to send push notifications to Android, iOS and Web applications. It’s a very reliable service to deliver messages with no cost.

FCM has a server-side API that you can call to send messages. See https://firebase.google.com/docs/cloud-messaging/server.

Sending Push Notifications

If you are building your application backend and the API with a PHP framework, then sending a message can be as simple as using curl to call a HTTP end-point. Consider the following example to send push notification from your server.

The Blocking API Call

When the Application is live and a number of users are using it, you will…


After using NGINX with PHP-FPM for more than 7 years, i have learned few optimization tricks to keep my stacks up for high traffic

TCP vs Unix sockets

For better performance, you can choose to switch to Unix domain sockets over TCP sockets

upstream backend 
{
# Unix sockets
server unix:/var/run/php56-fpm.sock;
# TCP sockets
# server 127.0.0.1:8080;
}

Sometimes depending on the cloud instance’s I/O speed, TCP ports provide much more scaling than Unix sockets.

Adjusting worker processes

Determine how many processors are there for your instance

cat /proc/cpuinfo | grep processor

and set the worker_processes in your nginx.conf file to the number of cores. …

Rezaur Rahman

Technology freak, System Architect. Wants to make a difference. CPO at G&R

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store