Category Archives: MySQL

How Many Servers Does A Web Hosting Service Need?

How Many Servers Does A Web Hosting Server Need?

How Many Servers Does A Web Hosting Server Need?

Web Hosting customers don’t always realize what goes on behind the scenes of their web hosting service. The layman often thinks that the web hosting service is just another software installed on a monster computer, bit of which are sold to the end user. But there’s a lot more that goes on behind setting up a web hosting service. While some hosts use separate machines to run services like email, FTP, HTTP etc., some hosts install all these services on a single machine. This article takes you into the web hosting world and shows you which software servers are running to give you the best web hosting experience with different services.

Web Server

The web server is one of the most important parts of your web hosting service. The web server is what actually delivers your web page to the user’s browser. It also handles different requests for information that your browser makes and also takes care of incorrect or erroneous requests. When you see 404 error pages or warning messages, these are all served up by the web server. Web hosts commonly use IIS, Apache, Nginx and Tomcat amongst many different web servers. Web servers use the HTTP protocol to communicate with the user’s browser. The administrator also has the capability of restricting folders, files and websites through the web server configuration.

Mail Server

The mail server is essential when providing email service. The mail server allows the sending and receiving of email on specific ports. The mail server helps filter the received mail to different users’ folders and thereby allows multiple domains to be hosted on a single physical machine. Mail servers are also capable of redirecting mail and applying conditional filters to weed out unwanted mail and fight spam. Most mail servers allow the use of third party plugins or software to aid them perform their functions. For example mail servers can intelligently use third party RBLs or black lists to identify if a mail sender is actually a source of spam which should be rejected before he can reach the mail server. Mail servers usually use IMAP, SMTP and POP3 protocols to serve their purpose.

FTP Server

Almost every web host offers FTP services to transfer files. But most users don’t realize that this requires an FTP server at the hosts end. An FTP server allows connections using the FTP protocol, for the transfer of files. This aids users in downloading or uploading files in simple, quick and efficient way. FTP servers control the bandwidth usage, user connections, authentication system and even file management for the user. FTP servers are inexpensive to maintain and are now considered as included in any web hosting package.

SQL Server

An SQL server is a database management server which allows users to create and store data in relational tables, using the Structured Query Language or SQL. On windows machines, Microsoft MS SQL is installed, whereas Unix based hosting systems usually come with open source alternatives like MySQL, Postgresql, MariaDB among others. Web hosts sell databases based on the package that the user takes. Each database requires CPU and memory resources to function properly. Databases form up the backbone of most websites which have a Content Management System or which store a large amount of data.

Others

Some web hosts offer their own DNS service, for which they need to run a DNS Server on their systems. The DNS server just maps the domain name to the servers IP address so that when a visitor is using a service on a website, he is served up the right information from the right source. Premium web hosts offer File Sharing services and have a Web DAV Server either separate or integrated into their Web Server (as above). This allows users to quickly sync files to and from their website onto their mobile devices. Almost all web hosts also provide an SSH service so that users can connect securely to different ports for different services on the account.

While web hosting may seem like an easy business, managing all these services can be quite a task, which web hosts need to do on a daily basis.

When Do We Need MySQL Databases With Our Web Hosting?

Whenever you buy web hosting, your hosting provider is sure to include an option called “Databases” in his price quotation or package details. But not many of us know what are databases and why we need them when setting up a website. This article aims to explain a couple of reasons why we use databases and when we need them for our website.

The database systems we usually get with our web hosting accounts are all relational database systems or RDBMS. If we take a Windows hosting server we usually get Microsoft SQL aka MSSQL and if we take a Unix based system we usually get MySQL. Both these systems put your website data into tabular layouts for fast and easy retrieval.

Databases are a collection of rows and columns, where each row or column is related to the others in some way. Due to this relation, information from this database can be retrieved quickly and efficiently as compared to if the data was stored in any other unstructured format. You can consider a database as a collection of multiple spreadsheets which are all related to each other in some way or the other.

Security

A major advantage of having your data stored in a database is the ability to protect the database from unauthorized access, or the ability to protect a database record from being tampered with. A simple example would be the storage of login credentials. In a simple way, login credentials can be stored in a simple text file and be read by your script which does the authentication. However, your file will always save the password stored in plan text, making it vulnerable to anyone who has access to it. Databases have the ability to encrypt the entries using a hashing algorithm to obscure them. Further, to read or write to the database, you need to specify login details, something which is not easily possible with an ordinary text file or spreadsheet.

Efficiency

Due to the manner in which data is stored in the database, retrieval and storage is most efficient. Unlike a spreadsheet, where anything and everything can be stored in any cell, SQL restricts the type of information stored in each row or column based on certain conditions. This validation is inherent in the properties of SQL and is an added advantage for a programmer or developer. Due to the various inbuilt mechanisms that are present in RDBMS systems, they are the most preferred method of storage and retrieval of data.

An article on the DatabaseJournal Blog explains this in a lucid way:

“…The problem with text files is during a read, if the text file is large, it can take quite a bite of time to open and scan the contents of the file looking for what we want. Also, if we wanted to see all the sales to a specific customer, the entire text file would have to be read, and every line occurrence of the customer name would need to be saved in some temporary place until we had them all. If we saved to a spreadsheet instead of a text file, we would have a Sort feature built in. So we may be able to find all the sales to a specific customer quicker, but again, if the file was large, opening the spreadsheet could take a great deal of time.”

Administrative Control

Database systems also have various control mechanisms which allow easy administration of the database and tables within it. The most important part is user management. Each user can be given specific rights to the database, thereby allowing limitation in access so as to secure the data from being tampered, modified or altered. Database Administrator’s can tweak many settings of the database thereby restricting the flow of data, the connection speeds, maximum number of connections to the server and even adjust what hardware resources should be allocated for performing a task.

Why Should You Pay Your Web Hosting Provider On Time?

Why Should You Pay Your Web Hosting Provider On Time?

A common grouse which most web hosts have is collection of payments and fees. Delayed payments from customers can mean that web hosts have to rework their monthly budget and cash flow and adjust their outward payments accordingly. This itself can be time-consuming and expensive. The advantage that web hosts have over other businesses is that they have full control over the clients account and can suspend the services or terminate the account at will. This article highlights a couple of reasons why you should pay your renewal fees or hosting charges to your web host, on a timely basis.

Prevent Account Suspension

Most web hosts automatically setup their services to Suspend or even terminate an account, if the renewal or subscription fees are not paid on time. This can be managed by an Automated Billing System which integrates with the Hosting Server and controls the Accounts. The billing system can send out automatic reminders for the payment and can also provide an online payment collection service. This means that clients can pay their renewal fees online at any time of the day, from anywhere in the world. If the deadline is missed, the account may be suspended after giving a Suspension Notice to the client. Account Suspension can lead to services becoming unavailable and visitors seeing a Suspension Message on all the pages.

Prevent Last Minute Delays

Last minute payments can be subject to several delays and failures which will ultimately lead to non-payment and the account getting suspended. Last Minute payments are often affected by bank delays, postal delays, payment processing issues, expired credit cards, connectivity issues and so on. Don’t wait till the last minute to make the payment, lest one of these factors prevents you from doing so and your payment becomes overdue and your account getting cancelled.

Prevent Your Website Ranking from falling

With a suspended account, you can’t do much. Search Engines will realise that your account is suspended and that no fresh content is being served up from it. This will lead to your ranking falling in various search engines. It may also lead you to fall so drastically that you are unable to recover from it. A prominent financial analyst Saneil Shah pointed out that “the cost of remembering and paying your hosting fees on time is miniscule compared to the loss your website will face if your website is suspended”. He went on to say that “losing your website ranking could lead to a permanent loss, which may be irrecoverable”.

Avoid Late Fees

Some hosting providers charge a Late Payment Fee to penalize clients for paying late as well as to deter procrastinators. While this may not be very helpful in getting payments on time, it surely helps the web host by compensating for the delay in payment. Late fees can be a fixed amount or even a percentage of the outstanding payment. This could increase the payment to a significantly high amount. When the payment due is high, there may also be interest on the outstanding amount along with the other charges. The simplest way to avoiding all these excess payments is to pay your dues on time.

Build Trust and Goodwill

When your payment for web hosting or related services is made on time or before time, it eases the burden of your web host in collecting the payment. Web hosts keep a mental note of your payment patterns and how many times they have to chase you up to recover the dues. Having a client who pays on time is a pleasure for any business and may lead to your host being helpful and even going beyond the line of duty to help you out when you most need it.

Can You Setup A Web Hosting Server In Your Home or Office?

Many of our friends who feel that they have outgrown shared hosting or a VPS service, often ask us whether they can setup a Dedicated Hosting Server in their own Home or Office to cut costs. Of course it is possible and has been done before by many companies, however, it may not always be a prudent option for a small or medium business and sometimes not a good idea for a large business too. This article explains what it entails to host your website or web apps from your own office or home.

Can You Setup A Web Hosting Server In Your Home or Office?

Server Room

While this may sound unnecessary, if you really want to do things professionally, you should have a dedicated server room which houses the server on which you are going to host your website or resources. This server room needs to have 24 x 7 facilities as given below. Many server hardware providers will not provide you with a warranty or may void the warranty if you do not have a dedicated server room with these facilities. The server room can be locked to ensure cleanliness and also for physical security of the infrastructure. Server Rooms need to have special ducting and cabling to accommodate all the physical connections to it. Servers are usually mounted in Server Racks, which house the Network Switches, Cables and peripherals.

Air Conditioning

Every server room or server should have the adequate temperature controlled environment, to ensure stability and smooth running. An HVAC system is required to ensure that the temperature and ventilation is balanced and that extreme external climates don’t affect the server hardware. The HVAC system needs to be run 24×7 and should ideally be fully automated.

Power Backup

Usually live servers have a UPS and Battery backup to ensure that in the event of a grid failure or power line fault, automatically the UPS kicks in and keeps the server afloat. Diesel powered generators are also commonly used to ensure prolonged sustenance of power supply to the facility.

Security and fire-fighting mechanisms

Physical security of the server is most important. Proper security and surveillance needs to be setup to ensure a safe environment for the server and its data. Intrusion detection systems, alarm systems and even CCTV camera’s maybe installed to provide all round protection. Server rooms need special fire fighting equipment with clean fire fighting agents to ensure that in the event of a fire, the fire extinguishers cause less damage than the actual fire. The clean foam leaves no residue and ensures that the affected area can be cleaned off the foam. These foams are very expensive and an entire commercial fire safety system can cost much more as compared to household ones.

Technicians

An important aspect of having a server which is live on the internet, is having a dedicated support team to troubleshoot it and to take corrective action in case of a fault. This means that you would need to employ minimum 2 people who have the relevant expertise, to work in 2 shifts round the clock. The technicians need to be well equipped with various testing and monitoring tools to enable them to keep the server up and running.

Spares

A wide array of spares need to be maintained at the site of the server, to ensure quick replacement of faulty hardware and also to ensure that the spares are available. Most server rooms have a standard of maintaining atleast one additional redundant piece of hardware, for every set of hardware put into or used for the server. This applies to cables and cabling equipment as well. Server rooms keep miles of spare cable at hand, to ensure emergency patching and quick replacement of faulty cables. Since cables are relatively inexpensive, they are completely discarded upon failure and are completely replaced.

You don’t need to mandatorily have these facilities when setting up a server, but not having these facilities will definitely hamper the smooth running of the hosting server in the long term. If you are serious about hosting your own website, you should do it professionally.

When Should I Shift From Shared Hosting To A VPS?

When Should I Shift From Shared Hosting To A VPS?

With storage and data processing moving online, web hosting is becoming more advanced by the day. but the overwhelming set of options leaves the end user spoilt for choice and also confused at the variety of options. A frequently asked question that we often hear is when should a customer shift from Shared Hosting to a VIrtual Private Server or VPS.

Root Access

A major concern for people on shared hosting is that they want to have all the control. They want to know what’s going on with the box that is hosting their website, what is the system status, what version of each software there is, what software should be there, who has access to the box, what hardware should be attached to it and so on. Some software or web applications genuinely require you to have root access to install certain add-ons or to configure some server-wide settings. These settings are such that they would not be permitted on a Shared Host due to its adverse impact on other websites sharing the same server and being affected by the configuration change. Shared Hosts need to keep a check and balance of all the software that will affect their system’s, because they are answerable to all their customers.

Isolation and Testing

Another important reason for switching to a VPS is to have your entire application, file system and maybe even network isolated from others. This maybe due to the sensitive nature of the application or the information stored on the server or may simply be to conduct some tests or experiments. Penetration testing on websites is done by creating a VPS with a mirrored version of the website, so that the actual website is not affected. Even firewalls and protection systems need to be tested in isolation. Testing the Operating System Kernel or making a change in the core files of an OS can be quite risky. No host will allow you to play around with their live servers.

Customized Requirements

When the software developer needs a specific set of requirements, like a specific Operating System or a specific Database Management System, then the conventional shared hosting may just not be the right option. Many a time the right combinations are also not available for developers. A specific database (DBMS) variant may not be available with any hosting company because it isn’t popular. Similarly no host will support a customized Linux version. This means that you will have to install and manage it yourself. If you don’t need to control the hardware of the box, then it makes no sense going in for a Dedicated Server - a VPS would be the ideal choice.

Selling a Service

If you are selling a hosted service, like a web application or an online software or an ecommerce platform, it’s best for you to take a VPS, if not a Dedicated Server itself. The VPS helps you to have full control and flexibility in managing the system and monitoring all aspects of your IT infrastructure. Those selling a “Software as a Service” are sure to need either a VPS or a Dedicated Server. Infact they should not use Shared Hosting which can be affected by various external factors as well as by other users on the same system. VPS systems can be easily migrated to a Dedicated Server and can be put into a production environment easily.

The decisive factor in choosing a VPS over a Dedicated Server is usually the price. A VPS is not a physical machine and hence shares the physical resources with other VPS systems. Whereas a Dedicated Server gives you ultimate control of even the hardware that is running your systems.

How To Prevent Spam Through Your Website Forms

How To Prevent Spam Through Your Website Forms

We all hate email spam in our email inbox, but rarely try to get to the root of the spam mail’s origin and purpose. Many webmasters face a problem of receiving spam emails through the forms on their website. These are usually contact forms which are setup for visitor’s to post their inquiries or to give feedback. Spammers try to hijack these forms to send spam mails, either by manipulating where the forms sends emails or by flooding the webmaster with junk mail. This article points out some of the ways in which you can fight spam in website forms meant for comments, feedback, inquiries and any other contact.

Form Fields Validation

A very important part of having a secure form is to ensure that there is strict validation of the form fields. This is best explained by an example. When you are accepting a phone number through the contact form, you can code the form to ensure that only numbers are entered in the form field. Similarly for an email address field, the form must be able to determine a well-formed email address has been entered. If the fields contain anything which that field is not supposed to contain, like special characters or some funny text, then the form will throw an error and will not be submitted till the mistakes are corrected. This prevents any malicious code or text from being inserted in the form. It also prevents automated bots from filling up the form without understanding what is required and how it is to be filled.

Captcha

One of the most effective ways of fighting form spam is by enabling a captcha at the end of each form. The captcha requires the user to enter a word or number verification which is shown in an image. This prevents bots and automated systems from sending the forms mindlessly. Since bots cannot usually detect text within images, they fail to enter the correct Captcha text preventing the form from being submitted.

Confirmation Alert

Another simple trick that can be used to harass the spammers is to add a confirmation alert box which pops up to confirm the details that the user is trying to submit. Robots and automatic form submission software are unable to cause the clicking of the confirmation button in the alert box. Something like: Are you sure you want to submit the form? Yes/No Can be an added layer of protection from comment spammers. This is also a good way of allowing users to review the information they are sending and correct any mistakes or typos before submitting the form.

Anti-Spam Plugins

Akismet is an Anti-Spam plugin used for WordPress, which can identify genuine comments and filter out the spam comments. This can be helpful if you do not want to enable a captcha confirmation box or cannot have specific validation on your form. Similar anti-spam plugins are available for other platforms as well. While Akismet type plugins are not 100% correct and may lead to some false-positives, they do a really good job of filtering out the noise.

Logging Information

One of the most important things that a programmer can do to track the sources of spam and patterns of spam is to log additional information of the user. This means that along with the normal fields that the user is submitting, the form will also capture his / her IP Address, machine name, browser details, location information and similar information which can be used to trace the spam source. Using this information you can either take action against the spammer or even block his IP Address. This way he will not be able to keep harassing you or making random submissions.

Some programmers also swear by hidden form fields in CSS, which prevent the form field names from being seen by bots, thereby preventing them from knowing what data to auto fill in the text boxes. Consult your coder for the best solution for your website.