-
Website and Game Server on separate hosting company
Is it possible that website and game server are located on different hosting company?
No problem on the game server side. But what about the website?
Example:
- Game Server is on Staminus DDS
- Website (MUCore or other MUWeb) is on Hostgator webhost.
How can I make the website access the database hosted on Staminus? And is it safe?
What's the advantage and disadvantage in this setup?
-
Re: Website and Game Server on separate hosting company
Advantages:
- saves on bandwidth
- saves on CPU & RAM on big servers
- when your website is (d)dosed it will help you keep your gameserver up
Disadvantages:
- exposure of MSSQL remote connection which may lead to several attacks
- big latency between the 2 servers because they are in different locations possible on different continents too depending on the hosting company
- if your MSSQL is not good configured it can delay the gameplay too
I would suggest you to go for a static content hosting and put there the cache-able content like javascripts, css, static images. The resources used by MU's websites are pretty low(PHP + cache in memory) and don't require a fully separated server unless you have some big numbers on unique visitors. If you still decide to work on separated servers than the best solution is to locate the servers on the same datacenter and ask for a closed private network between your servers only. This will give you a low latency connection of high speed and your visitors will not encounter any delay.
-
Re: Website and Game Server on separate hosting company
We found that's better to host on the same hosting company but on different servers. VPS for website on same datacenter as dedicated = win
-
Re: Website and Game Server on separate hosting company
Agreed with Dios. Much better idea. I think Graveyard Networks have that type of configuration. Ask jumong about this
-
Re: Website and Game Server on separate hosting company
and how we make the connection between website and server ? i am hosting myself the mu server and my website i want to host at a hosting company in my country. the ping between me and hosting company is like 2-4 maximum 5. I don't know if it will be so big latency.. but i want to try but i need to know how to make the connection using mu core 1.0.8
tnx, waiting for a reply
-
Re: Website and Game Server on separate hosting company
Buy a shared host with windows/plesk.
Turn free the SQL remote port
In IP/host of website's config file you insert the VPSIP,SQlPort. Like: 127.0.0.1,1433
Remeber: verify with bussiness if your services is compatible.
Sorry my bad english
-
Re: Website and Game Server on separate hosting company
This can be possible doing this:
Site hosting contains:
- Website whit connection to MSSQL (Using php and anti DDoS system).
* Register (Preventing DDoS, use captcha, in case of alot of captcha fails block the IP from apache)
* Character CP (Using captcha too)
* Server stats (update every 10 minutes and save values in site part).
VPS or Dedicated server machine:
- Mu Server files (Running ¬¬).
- MSSQL (Add a password and bind the site host ip in MSSQL configs).
______
Doing this the server will not have simple DDoS attacks (Or almost the webpage will be down), whitout lagging too much the gameplay.
-
Re: Website and Game Server on separate hosting company
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ Mu Server
+ MSSQL Dataserver
+ IIS (Apache) with security mod or any like this (IP filter for port 80)
(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)
Advantage:
Build PHP API Server, and place it on your (A):
PHP API Server:
+ You can use GET or POST method, GET is recommended.
+ You need setup your own access token (for security)
+ Respond as JSON data (simple to filter data) or text/html
Place PHP API Client on (B):
+ Use cUrl (or ...) to make a GET or POST request to your API Server
+ Verify json data from your API Server, if true => alert success,...
Example register:
+ Server API, place (A):
PHP Code:
<?php
// API Server
// Include your database connector here
// Sample as $database
// Access token
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";
$account = $_GET['account'];
$password = $_GET['password'];
$email = $_GET['email'];
$personal_id = $_GET['personal_id'];
if($access_token != $_GET['token']) die('Cannot process');
function check_account_exist($account) {
// I am using basic method
$test = $database->query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='".$account."'");
if(isset($test['memb___id']) AND $test['memb___id'] == $account) {
return false;
}
return true;
}
if(check_account_exist($account)) {
$data = array(
"respond" => true
);
// Run INSERT Query to add new account here
} else {
$data = array(
"respond" => false,
"error_code" => 1
);
}
die(json_encode($data));
?>
+ Client API, place (B)
PHP Code:
<?php
if($_POST['submit']) {
// Example you already have cUrl class
// Call it as "cUrl_send"
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";
$data = cUrl_send("http://YOUR_SERVER_API_IP/register.php?account=".$_POST['account']."&password=".$_POST['password']."&email=".$_POST['email']."&personal_id=".$_POST['personal_id']."&token=".$access_token);
$data = json_decode($data);
if(isset($data) && is_array($data)) {
if($data['respond']) {
// Register success
} else {
// Failed, show error code
die("Failed, error code ". $data['error_code']);
}
}
else {
// Error
// Something like
die("Cannot connect to gameserver");
}
}
?>
<form method="POST">
<input name="account" type="text">
<input name="password" type="text">
<input name="email" type="text">
<input name="personal_id" type="text">
</form>
You need to add captcha.
Do not open MSSQL port as public.
Use this solution will help your server very very more security
Quote:
Advantages:
- saves on bandwidth
- saves on CPU & RAM on big servers
- when your website is (d)dosed it will help you keep your gameserver up
-
Re: Website and Game Server on separate hosting company
Very interesting, but possible for more about the installation and configuration?
---------------------------------------
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ IIS (Apache) with security mod or any like this (IP filter for port 80)
(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)
Example register:
+ Server API, place (A):
PHP Code:
+ Client API, place (B)
PHP Code:
----------------------------------------
How to organize it all? Waiting for an answer
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
Murphiks
Very interesting, but possible for more about the installation and configuration?
---------------------------------------
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ IIS (Apache) with security mod or any like this (IP filter for port 80)
(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)
Example register:
+ Server API, place (A):
PHP Code:
+ Client API, place (B)
PHP Code:
----------------------------------------
How to organize it all? Waiting for an answer
You need to learn basic PHP/MSSQL (ASP/MSSQL).
(A) In PHP Code, you need add MSSQL connection info, call it as $database = new class(xxx), write a member query function.
(A) You need write a cUrl function to send/recv GET data
(B) You need write a cUrl function to send/recv GET data
-
Re: Website and Game Server on separate hosting company
If you want to make that, you have to open the MSSQL port (1433) and write the config that it connects to it...ex: 123.123.123.123:1433
-
Re: Website and Game Server on separate hosting company
You'll have two big problems with it, but you can do some tricks too.
1 - You'll have to "expose" your MSSQL port:
You can change the default port (1433) and add some security, like trusted connection and IP restrictions to have a better security.
2 - You'll have send connection data over INTERNET.
SQL already have a good encrypt algorithm, but you can improve it and add server data encrypt on it.
You can also use a service like CloudFlare to reduce some of this problems and help to improve your security.
Best regards,
Afonso Lage.
-
Re: Website and Game Server on separate hosting company
Connections which package to choose? there is a host on Linux
On my hosting Frey TDS 8 and does not work.
-
Re: Website and Game Server on separate hosting company
I highly recommend to host your website on a diffrent plaftorm than your servers plaftorm.
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
lastpr0
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ Mu Server
+ MSSQL Dataserver
+ IIS (Apache) with security mod or any like this (IP filter for port 80)
(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)
Advantage:
Build PHP API Server, and place it on your
(A):
PHP API Server:
+ You can use GET or POST method, GET is recommended.
+ You need setup your own access token (for security)
+ Respond as JSON data (simple to filter data) or text/html
Place PHP API Client on (B):
+ Use cUrl (or ...) to make a GET or POST request to your API Server
+ Verify json data from your API Server, if true => alert success,...
Example register:
+ Server API, place (A):
PHP Code:
<?php
// API Server
// Include your database connector here
// Sample as $database
// Access token
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";
$account = $_GET['account'];
$password = $_GET['password'];
$email = $_GET['email'];
$personal_id = $_GET['personal_id'];
if($access_token != $_GET['token']) die('Cannot process');
function check_account_exist($account) {
// I am using basic method
$test = $database->query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='".$account."'");
if(isset($test['memb___id']) AND $test['memb___id'] == $account) {
return false;
}
return true;
}
if(check_account_exist($account)) {
$data = array(
"respond" => true
);
// Run INSERT Query to add new account here
} else {
$data = array(
"respond" => false,
"error_code" => 1
);
}
die(json_encode($data));
?>
+ Client API, place (B)
PHP Code:
<?php
if($_POST['submit']) {
// Example you already have cUrl class
// Call it as "cUrl_send"
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";
$data = cUrl_send("http://YOUR_SERVER_API_IP/register.php?account=".$_POST['account']."&password=".$_POST['password']."&email=".$_POST['email']."&personal_id=".$_POST['personal_id']."&token=".$access_token);
$data = json_decode($data);
if(isset($data) && is_array($data)) {
if($data['respond']) {
// Register success
} else {
// Failed, show error code
die("Failed, error code ". $data['error_code']);
}
}
else {
// Error
// Something like
die("Cannot connect to gameserver");
}
}
?>
<form method="POST">
<input name="account" type="text">
<input name="password" type="text">
<input name="email" type="text">
<input name="personal_id" type="text">
</form>
You need to add captcha.
Do not open MSSQL port as public.
Use this solution will help your server very very more security
Need security in your code.
-
Re: Website and Game Server on separate hosting company
Its so simple... dont unblock 1443 ... just add the ip you want to grant acces in your firewall`s ip exception list...
-
Re: Website and Game Server on separate hosting company
agree on Dios,,, VPS for website and DDS for gameservers
-
Re: Website and Game Server on separate hosting company
any recomendation for VPS or DDS hosting for R that wont lagg on different countries?
-
Re: Website and Game Server on separate hosting company
-
Re: Website and Game Server on separate hosting company
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
RE5P3CT
At how much PPS do you get kicked out?
Don't tell me it's unlimited, I won't believe that . ^_^
-
Re: Website and Game Server on separate hosting company
Staminus offers up to 10.000.000
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
xDarKyx
At how much PPS do you get kicked out?
Don't tell me it's unlimited, I won't believe that . ^_^
lol of course its not unlimited, also if you know unlimited DDOS protection tell me i will rent from them :)
-Staminus is good for mu servers including basic level protection and can be protect you against some TCP and UDP attacks, actually i dont now how much PPS they offer with that but i guess almost 20-30k.
if you need more protection you need to pay for that price are really high but u will be secure.
-Sharktech offer free of charge DDOS protection up to 10gpbs and price better than staminus.
-DDHS offers base level attack price are good for mu server.
SEFlow offer 0.5 Gbps (free) and this will help a lot of mu servers. if you need more protection u must pay for it.
I did some research(still doing that) for mu servers because some server owners getting attack(i get before when we got 270+ players).
I hope this will help you.
@Dios : Staminus is best DC as i see but price are really bad for mu servers :)
and can you tell me what u use for ddos protection free or paid?
-
Re: Website and Game Server on separate hosting company
50.000 is free with dedicated servers.
I use paid.
-
Re: Website and Game Server on separate hosting company
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
MaxZeus
nice offer but not for private mu online servers.
Price are really high :)
-
Re: Website and Game Server on separate hosting company
Quote:
Originally Posted by
RE5P3CT
nice offer but not for private mu online servers.
Price are really high :)
There are MU servers using it :), all depends of the investor.
-
Re: Website and Game Server on separate hosting company
thats all about budget for your servers, actually i never sell donation items, i just offer VIP membership just for 5$(1months).
we get 270+ players in first 3 days but some kids attacked us, so we closed game..
Important thing : if you sell donation items ofc u can buy from them because that money is nothing for mu servers who selling items ;)
-
Re: Website and Game Server on separate hosting company
Yeah, you are correct.
Without donations, no way, but with donations, you can surely use something decent ! :)
-
Re: Website and Game Server on separate hosting company
We do not sell items and yet we cover the 1000usd we spend on hosting a month.
Our vip is less than 2usd a month.