Skip to content
Snippets Groups Projects
Commit da07c46f authored by Sara Stentvedt Luggenes's avatar Sara Stentvedt Luggenes
Browse files

week 9 task one

parent ee516da4
No related branches found
No related tags found
No related merge requests found
...@@ -402,13 +402,13 @@ Our procedure for closing and opening production can be found under /prosedyrer ...@@ -402,13 +402,13 @@ Our procedure for closing and opening production can be found under /prosedyrer
To install memcache, we used the 2. alternative, by installing a memcache docker image on our webserver, www3. By running this command, we create and starts the officiall memcache image: To install memcache, we used the 2. alternative, by installing a memcache docker image on our webserver, www3. By running this command, we create and starts the officiall memcache image:
``` ```
docker run --name=memcache -p 11211:11211 -d 192.168.130.6:5000/memcached memcached -m 128 docker run --name=memcache -p 11211:11211 -d 192.168.130.6:5000/memcached memcached -m 1g
``` ```
The ip-adress is the webservers ip-adress. We give the image 128 GB RAM to use. The ip-adress is the webservers ip-adress. We give the image 1 GB RAM to use.
First we need to install this library: First we need to install this library:
```apt-get install -y php-memcache```. Without this library, we will get an error when we make changes to the config.php file in bookface. ```apt-get install -y php-memcache```. Without this library, we will get an error when we make changes to the config.php file in bookface. We install this library in the Dockerfile, not on the webserver.
The we add these lines to the config.php: Then we add these lines to the config.php:
``` ```
$memcache_server = "192.168.130.6:11211"; $memcache_server = "192.168.130.6:11211";
$memcache_enabled = 1; $memcache_enabled = 1;
...@@ -452,6 +452,10 @@ This verify that memcache is indeed working as excpected. ...@@ -452,6 +452,10 @@ This verify that memcache is indeed working as excpected.
### 1) Clusters vs Replicas ### 1) Clusters vs Replicas
The difference between a databasecluster and a replicated database is the servers role. With replication, we have typical one main-databaseserver(master), and multiple worker-databaseservers(slaves). The webserver is able to read and write to the main-server, but will only be able to read the workers. The main will push updates to the workers regulary. This will make a robust setup, where the workers can be read even though main is down. We will also get increased performance, since we distribute the load between multiple servers. Backup can also be runned on a worker.
### 2) Start new bookface architechture ### 2) Start new bookface architechture
#### Prework) Create new VM's #### Prework) Create new VM's
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment