# Servers in general



## tenchu (Apr 5, 2019)

Hello and good evening, 

I have a few questions with regards servers, some may be easier to answer than others but here goes.


Is a server a particular piece of hardware? By this I mean, is there a particular piece of hardware that is classed as a server in the same way as a laptop is a laptop, a desktop is a desktop etc...? or, is it the software installed which makes it a server?
I have seen it mentioned that laptops, desktop and even small embed style systems such as arduino and raspberry pi can be used as servers, if this is so, is there a specific hardware requirement before something can be used as one?
If a server is purely software, how many types can be installed on one device, i.e. could you install a mail server, database server etc... all on the same device?
I will apologise in advance for if any of the questions come across as ill informed but I am wanting to learn more about networking, and reading about it clearly isn't working.  So, my thoughts were to actually have a go at setting something up rather than sit and read page after page.  It worked wonders for learning to use BSD so I'm applying the same logic here.

Kind regards as always,
Nick


----------



## VladiBG (Apr 5, 2019)

Hello,

1. and 2. read this https://en.wikipedia.org/wiki/Server_(computing)
3. You can install many services on the same hardware but it's not recommended because the goal is not to have a single point of failure. That's why the software services are distributed across several hardware devices called clusters.


----------



## ralphbsz (Apr 6, 2019)

It's complicated.  Let me give you an example: Is a swimmer a particular type of person?  Is a sprinter a particular type of person?  How about a father?  Can one person be simultaneously a sprinter, swimmer, stamp collector, and amateur musician?  The answer is sort of yes and no.  Yes, a person can have multiple hobbies, and perform in multiple sports. But some people are highly specialized, and are particularly known for their abilities in one field.  So Carl Lewis is known for his sprinting ability; while he might be a passable swimmer (I don't actually know whether he knows how to swim), he is clearly not anywhere near Michael Phelps.  If you forced Carl Lewis, one of the greatest athletes ever, to compete in a swimming tournament, the result would probably be bad, and similar if you forced Michael Phelps to run 100m really fast.  I don't know whether either of them would know how to identify the "blue mauritius", and probably neither of them is really good at playing the bassoon (few people are).

So to answer your question.  The term "server" really means multiple things.  First, the function of serving a protocol or service for other processes or computers.  Typical examples include web servers (often using the apache software), or mail servers (sendmail etc.), or as a file server (say ZFS and Samba) and so on.  Pretty much any computer that has a minimum amount of memory can act as a server; for example the Raspberry Pi in my basement does have apache running, and I forget what mail MTA I installed on it.  But a RPi is a very bad server: it has a slow CPU, very little memory, and laughably slow disks.  It works, but badly.  For some applications it would be so laughable that it becomes pointless: Using a RPi as a CIFS server with ZFS and Samba would just get my users really mad, because it would either be ridiculously slow, or outright crash due to lack of memory.  But what my little RPi is really good at: Efficiently, for less than $50, it monitors a few temperature and water pressures.

Much of computer software today is actually built on a client/server paradigm.  For that reason, even the smallest computers (such as laptops or RPIs) contain server software.  I just looked on the RPi that I own, and it seems to run 28 servers, among them syslog, sshd, cron, about a dozen Linux-specific ones, and my own temperature/water monitoring one.  Another example: The display on a laptop today uses client/server setup: the laptop runs a display server (typically a variant of X-windows) and programs that display something (like the clock in the top right of the display) send requests to the display server, to draw a short line that points to the number "2".

At the other extreme, I can buy a computer that is specialized for serving, and it will work fabulously well.  I know some people who build their servers using two Intel Platinum Xeon chips with 56 cores each, with 768 GB of memory, and a half-dozen SAS HBAs connected to many hundreds of disks.  You can install the same software on it (Apache for web, sendmail for mail, and ZFS/Samba for file service), and it will run blazingly fast.  You can buy two machines like it, and it will even become more reliable (one is still serving while the sys admin is performing maintenance on the other).  You can buy a hundred of these machines, and the resulting assembly would make the record books for the largest publicly known file system (I think the Summit supercomputer currently holds that record).  On the other hand, this computer has many downsides.  It is heinously expensive (probably a quarter or half million $), very large (half a rack with all the disk enclosures), uses a lot of power (more than a normal household wall outlet can provide), and generates an enormous amount of heat and noise.

Typical server machines are rack mounted (or even part of custom racks), sometimes water-cooled but at least designed for efficient cooling in data centers, they typically have lots of CPU, RAM and IO bandwidth (it's not unusual to see machines that have a dozen PCIe slots as servers), and they are often very expensive.  The never have built-in displays, and usually really crappy graphics hardware (just a VGA output and a few USB ports for keyboard and mouse, barely enough to install the OS with).

You can use server class hardware for the same function as a laptop (display and type), and you can use it like an embedded system (yes, in addition to serving a half million dollar worth of IO requests, it could monitor the temperature).  No sane person would take a server-class machine and use it as a laptop ... it has really bad display hardware (matter-of-fact no built-in screen!), only external keyboard and mouse, and it is impractically large.  Similarly, a typical laptop or embedded machine such as the RPi can act as a server, but it will be very limited in its capability.  Just like Michael Phelps is probably a lousy musician, with very bad bassoon skills, but he can probably do a little bit of drumming and singing if needed.

So to begin with, the term "server" really means three different things:

Any piece of computing infrastructure that responds to requests.  Typical examples are a http server like apache.  But even the smallest Unix machines have servers, for example syslog, which responds to requests such as "put this line of text in the log".
A particular software implementation that creates such a server.  Typical examples are apache, Samba, syslog, and so on.  Small servers such as syslog are part of any OS.  Larger ones, such as apache or MySQL are optional pieces of software.
Particular hardware styles that are optimized for being servers, at the cost of being bad at other uses, and are typically large and expensive.
As you can see, these three different things are not identical, but often correlated.

P.S. Apologies to Carl Lewis and Michael Phelps if I mischaracterized their musical and athletic abilities.


----------



## tenchu (Apr 7, 2019)

ralphbsz said:


> It's complicated.  Let me give you an example: Is a swimmer a particular type of person?  Is a sprinter a particular type of person?  How about a father?  Can one person be simultaneously a sprinter, swimmer, stamp collector, and amateur musician?  The answer is sort of yes and no.  Yes, a person can have multiple hobbies, and perform in multiple sports. But some people are highly specialized, and are particularly known for their abilities in one field.  So Carl Lewis is known for his sprinting ability; while he might be a passable swimmer (I don't actually know whether he knows how to swim), he is clearly not anywhere near Michael Phelps.  If you forced Carl Lewis, one of the greatest athletes ever, to compete in a swimming tournament, the result would probably be bad, and similar if you forced Michael Phelps to run 100m really fast.  I don't know whether either of them would know how to identify the "blue mauritius", and probably neither of them is really good at playing the bassoon (few people are).
> 
> So to answer your question.  The term "server" really means multiple things.  First, the function of serving a protocol or service for other processes or computers.  Typical examples include web servers (often using the apache software), or mail servers (sendmail etc.), or as a file server (say ZFS and Samba) and so on.  Pretty much any computer that has a minimum amount of memory can act as a server; for example the Raspberry Pi in my basement does have apache running, and I forget what mail MTA I installed on it.  But a RPi is a very bad server: it has a slow CPU, very little memory, and laughably slow disks.  It works, but badly.  For some applications it would be so laughable that it becomes pointless: Using a RPi as a CIFS server with ZFS and Samba would just get my users really mad, because it would either be ridiculously slow, or outright crash due to lack of memory.  But what my little RPi is really good at: Efficiently, for less than $50, it monitors a few temperature and water pressures.
> 
> ...


Spot on thank you. I was going go have a go at installing and learning mysql or postgre. I tried both and gave up. Postgre was a nightmare to install on windows, well the postgis part, so I uninstalled it and forgot about it (I tried multiple times to get it to work but kept getting error messages). I tried installing mysql and it all seems to have installed fine but most of the help seems geared towards linux users. I shall try to install a copy on my ubuntu laptop tomorrow then look for a basic tutorial to get me started.


----------



## Afflospark (Apr 7, 2019)

Server is something that is serving data over LAN/WAN or responding to the client's request. (client is something who ask for data or make the request to the server)
1. Server is the same system as your laptop. servers are provided with better hardware configuration to achieve uptime like years without any reboot.
2. No there is no specific hardware configuration to be called server. Whoever server the data or responding to client messages will be called server.
3. MailServer -  you could say it a subset of a server. Its piece of software, installed on the server who respond to requests related to email.


----------

