Centralising Apache logs can be useful in many scenarios. Let’s get the basics 1st. So Apache logs can be defined as
In order to effectively manage a web server, it is necessary to get feedback about the activity and performance of the server as well as any problems that may be occuring. The Apache HTTP Server provides very comprehensive and flexible logging capabilities.
Today we’ll setup Apache to log each access request to MySQL database rather than storing it in a flat file. Unlike logging to a flat text file, a SQL-based log exhibits tremendous flexibility and power of data extraction. Let’s dive in.
and Apache access logs can be defined as
The server access log records all requests processed by the server. The location and content of the access log are controlled by the CustomLog directive.
Today let’s see how to setup Apache to use MySQL to store the all the logs. Apache access logs will be sent to MySQL database through the Apache log module.
Let me explain about the utility. It has the ability to start a process if it is not running, restart a process if not responding and stop a process if uses high resources. In simple words it’s a helpful program that automatically monitors and manages server programs/resources to ensure that they stay online 24/7 while maintaining the correct file size, checksum and permissions. It’s important system monitoring tool anyone would like to have in their mission critical systems. With the web interface given you could see what’s going on with your system. In this article I’ll be covering end-to-end and providing you value links to be bookmarked in your browser(tongue-out-face).
– Read More –
Loading balancing is a hot topic when it comes to high availability(HA). You can distribute the workload among server using a load balancer such as HAProxy. Today we are going to take a look at MySQL loading balancing with HAProxy. To load balance at least you should have 2 nodes of MySQL running. If you haven’t got 2 MySQL nodes running refer the previous post on MySQL Master-Master replication.
HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for very high traffic web sites and
powers quite a number of the world’s most visited ones.
Server 1 – Node 1
Server 2 – Node 2
Server 3 – Load Balancer
Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves).
In other words MySQL replication is the process by which data stored in a database, will be copied to a second server’s database. This is called MySQL master-slave replication. Today I’m going to focus on MySQL master-master replication where it allows data to be copied from either server. In other words perform reads or writes from either server.