Ha Proxy sample config frontend ssl

You can use Haproxy for a frontend ssl

with redirect from port 80 to 443

 

here is a sample haproxy.cfg


global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice

user haproxy
group haproxy
daemon
stats socket /etc/haproxy/haproxysock level admin

maxconn 16384
tune.ssl.default-dh-param 4096
defaults
log global
balance roundrobin
mode http

retries 3
option httplog
option dontlognull

maxconn 10240
timeout connect 5s
timeout client 15s
timeout server 60s

backend my_frontend_pool
option forwardfor

server mylocalserver1.example.com 10.10.18.30:8080 weight 1 maxconn 512 check
server mylocalserver2.example.com 10.10.18.40:8080 weight 1 maxconn 512 check
server mylocalserver3.example.com 10.10.18.50:8080 weight 1 maxconn 512 check


frontend mylocalfrontend.example.com
bind 10.241.18.20:443 ssl crt /etc/ssl/myserver/wild.pem ciphers ECDHE+aRSA+AES256+GCM+SHA384:ECDHE+aRSA+AES128+GCM+SHA256:ECDHE+aRSA+AES256+SHA384:ECDHE+aRSA+AES128+SHA256:ECDHE+aRSA+RC4+SHA:ECDHE+aRSA+AES256+SHA:ECDHE+aRSA+AES128+SHA:AES256+GCM+SHA384:AES128+GCM+SHA256:AES128+SHA256:AES256+SHA256:DHE+aRSA+AES128+SHA:RC4+SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS no-sslv3

acl clear dst_port 80
acl secure dst_port 443

reqadd X-Forwarded-Proto:\ https if secure
reqadd FRONT_END_HTTPS:\ on if secure

default_backend my_frontend_pool

listen my_statistics :60099
stats enable
stats uri /
stats refresh 15s

Varnish Example Config

This is for Version 4 i think it´s also work on Varnish 5

 


# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
vcl 4.0;

# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
}

acl purge {
"localhost";
"10.0.0.0"/8;
}

sub vcl_recv {
# Happens before we check if we have this in cache already.
#
# Typically you clean up the request here, removing cookies you don't need,
# rewriting the request, etc.
if (req.restarts == 0) {
if (req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}

if (req.method == "PURGE") {
if (!client.ip ~ purge) {
return(synth(405,"Request method not allowed."));
}
return (purge);
}

##pass a url not in cache
if (req.url ~ "^/admin/") {
return(pass);
}

if (req.method != "GET" &&
req.method != "HEAD" &&
req.method != "PUT" &&
req.method != "POST" &&
req.method != "TRACE" &&
req.method != "OPTIONS" &&
req.method != "PATCH" &&
req.method != "DELETE") {
return (pipe);
}

unset req.http.cookie;

if (req.method != "GET" && req.method != "HEAD") {
return (pass);
}

if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") {
unset req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
unset req.http.Accept-Encoding;
}
}

return(hash);
}

sub vcl_hash {
hash_data(req.url);

if (req.http.host) {
hash_data(req.http.host);
} else {
hash_data(server.ip);
}

if (req.http.accept-language) {
hash_data(req.http.accept-language);
}

if (req.http.Cookie) {
hash_data(req.http.Cookie);
}
}

sub vcl_miss {
return(fetch);
}

sub vcl_backend_response {
# Happens after we have read the response headers from the backend.
#
# Here you clean the response headers, removing silly Set-Cookie headers
# and other mistakes your backend does.
unset beresp.http.set-cookie;


### set varnish cache time ttl
if (beresp.ttl < 1d || beresp.http.Set-Cookie) {
set beresp.ttl = 1d;
unset beresp.http.Cache-Control;
return (deliver);
}

set beresp.grace = 1d;

return (deliver);
}

sub vcl_deliver {
# Happens when we have all the pieces we need, and are about to send the
# response to the client.
#
# You can do accounting or modifying the final object here.
unset resp.http.X-Powered-By;
unset resp.http.Server;
unset resp.http.X-Drupal-Cache;
unset resp.http.X-Varnish;
unset resp.http.Via;
unset resp.http.Link;

return (deliver);
}

 

DF -h is not up to date and show a full disk

I was wondering, after a delete some log files, the disk is furthermore full.

 

 

df-h_full_disk

Show which process is using a deleted files

lsof +L1

show something like that

filebeat 2416 root 608r REG 202,1 36527 0 135333 /var/log/syslog-20170509 (deleted)
filebeat 2416 root 615r REG 202,1 28672 0 135049 /var/log/syslog-20170511 (deleted)
filebeat 2416 root 618r REG 202,1 12288 0 135054 /var/log/syslog-20170512 (deleted)
filebeat 2416 root 621r REG 202,1 262144 0 140842 /var/log/syslog-20170513 (deleted)
filebeat 2416 root 623r REG 202,1 28672 0 134561 /var/log/syslog-20170521 (deleted)
filebeat 2416 root 628r REG 202,1 32768 0 134341 /var/log/syslog-20170515 (deleted)
filebeat 2416 root 634r REG 202,1 8192 0 133773 /var/log/syslog-20170517 (deleted)
filebeat 2416 root 638r REG 202,1 8192 0 136486 /var/log/syslog-20170518 (deleted)
filebeat 2416 root 640r REG 202,1 16384 0 135055 /var/log/syslog-20170519 (deleted)

Restart your process and all is fine

Found here

https://serverfault.com/questions/232525/df-in-linux-not-showing-correct-free-space-after-file-removal

Varnish, Nginx with SSL install under Ubuntu 16.04 / 18.04

Install Varnish 5.1 6 on Ubuntu 16.04 sound´s like easy. WTF? Not realy

Here is my configuration of Varnish with Nginx ssl on Ubuntu 16.04/18.04
With my configuration you don´t need adjust varnish port config. Feel free to adjust your Varnish config, increase your memory pool etc.

Update april 2018

*Please install directly Varnish 6 and no older Version *

Update July 2018

Notice for Ubuntu 18.04 it gives no deb package at the moment

you must use the xenial packages, see github comment

https://github.com/varnishcache/pkg-varnish-cache/issues/100

Update October 2018

DEB package for Ubuntu 18.04 are available

 

 


Install Varnish

First install Varnish  4.1 or 5.1 6

You can use Ubuntu repository

apt-get install varnish

Now you have Varnish 4.1 on the System

Or use these instructions to install Version 6

https://varnish-cache.org/releases/install_debian.html

So you will get Varnish 5.1 6

start and enable Varnish as service

sudo systemctl start varnish.service

sudo systemctl enable varnish.service

 


Trouble with systemd and varnish

Description from Varnish to config Varnish with systemd

https://docs.varnish-software.com/tutorials/configuring-systemd-services/

Look at here when you in trouble with systemd and Varnish or below, its easy to solve.

THX to Mattia for this great blog post or the new solution from varnish below. Varnish solution testet with version 6.

http://deshack.net/how-to-varnish-listen-port-80-systemd/ (Link is no longer valid)

This Snippet is from Mattia´s blog post
The real problem

The official tutorial is a little bit outdated. Or, better, doesn’t take into account the testing version of Debian, which uses systemd instead of init.d as init system. And this makes a huge difference, explained in a bug report. Basically, /etc/default/varnish is only read by the /etc/init.d/varnish script, not by the systemd init script (/lib/systemd/system/varnish.service).

Now that we know this little detail not reported in the documentation, it’s easy for us to solve the problem.

The easy solution

All we have to do is override the systemd init script of varnish and change something.

# cp /lib/systemd/system/varnish.service /etc/systemd/system/
# nano /etc/systemd/system/varnish.service

We come up with something like this:

[Unit]
Description=Varnish HTTP accelerator

[Service]
Type=forking
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStartPre=/usr/sbin/varnishd -C -f /etc/varnish/default.vcl
ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
ExecReload=/usr/share/varnish/reload-vcl

[Install]
WantedBy=multi-user.target

Which is similar to what we saw before. We already now that we have to change the port passed as a value to the -a flag:

ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m

Why don’t just let this script read the /etc/default/varnish file? Because we don’t know, for now, what systemd or other init systems are going to do with default files. They could ignore them in the future, for example. Therefore, the safest solution for us is writing the full command in the script itself.

Problems: reloading Varnish

After discovering what explained above, we could consider the varnish default file completely unuseful. That’s not right. In any moment we could want to reload the Varnish configuration, this way:

# systemctl reload varnish.service

And here come other problems. That command runs the /usr/share/varnish/reload-vcl script, which reads the /etc/default/varnish file. This implies that we have to update both /etc/systemd/system/varnish.service and /etc/default/varnish in order to make Varnish work properly.


Solution from Varnish

Customize Varnish default config

https://varnish-cache.org/docs/trunk/tutorial/putting_varnish_on_port_80.html

/etc/systemd/system/varnish.service.d/customexec.conf

cd /etc/systemd/system/

mkdir varnish.service.d

vim customexec.conf

[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s default,1g

run systemctl daemon-reload and systemctl restart varnish

don´t edit your /etc/default/varnish changes there will not be affected to your varnish config. Edit your systemd conf file /etc/systemd/system/varnish.service.d/customexec.conf


Adjust some Varnish conf files.

/etc/varnish/default.vcl

adjust the port on the default.vcl or more when you need it. With Varnish 6 is default 8080.

Change it to 8080


#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples.

# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
vcl 4.0;

# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
}

sub vcl_recv {
# Happens before we check if we have this in cache already.
#
# Typically you clean up the request here, removing cookies you don't need,
# rewriting the request, etc.
}

sub vcl_backend_response {
# Happens after we have read the response headers from the backend.
#
# Here you clean the response headers, removing silly Set-Cookie headers
# and other mistakes your backend does.
}

sub vcl_deliver {
# Happens when we have all the pieces we need, and are about to send the
# response to the client.
#
# You can do accounting or modifying the final object here.
}

look with properties Varnish is running

ps aux | grep varn
varnish 18342 0.0 5.3 118936 84584 ? SLs 08:53 0:00 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
vcache 18350 0.0 5.5 339568 87252 ? Sl 08:53 0:01 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
root 31137 0.0 0.0 11228 876 pts/6 S+ 09:47 0:00 grep –color=auto varn
root 31600 0.1 0.2 181600 3560 pts/4 Sl+ 09:09 0:04 varnishhist

Varnish is running you can test it with

your ip:6081

You will see a screen with a backend error, lets fix us this.


Install a webserver

Now we need the nginx web server or apache

apt-get install nginx

We need 3 config files

The first config file are redirect from port 80 to 443 and add www to your domain.

vim /etc/nginx/sites-available/redirect


server {
listen 80;
server_name example.com;
return 301 https://www.example.com$request_uri;
}

We need our main config file that will be run our website. I will serve a static html page for the moment.

vim /etc/nginx/sites-available/roundtrip


server {
listen 8080 default_server;
root /var/www/html;

server_name _;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

}

The last config file our ssl termination with nginx. I´m using let´s encrypt certs. You can use self signed cert´s or buy something.

vim /etc/nginx/sites-available/ssl


server {
listen 443 http2 ssl;

server_name www.exmaple.com exmaple.com;
ssl_certificate /etc/letsencrypt/live/www.exmaple.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.exmaple.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:6081;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
}

}

lets activate our new nginx config


cd /etc/nginx/sites-enabled/

ln -s /etc/nginx/sites-available/redirect redirect
ln -s /etc/nginx/sites-available/roundtrip roundtrip
ln -s /etc/nginx/sites-available/ssl ssl

check the config

nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

service nginx restart

That´s it!

Error: Cannot open socket: :6081: Address family not supported by protocol varnish Ubuntu 16.04 LTS

Install Varnish 5 on Ubuntu 16.04

https://packagecloud.io/varnishcache/varnish5/install

 

You running Varnish 4 or 5 under Ubuntu 16.04 and have disable IPv6. You become following error.

 

Error: Cannot open socket: :6081: Address family not supported by protocol

 

https://github.com/varnishcache/varnish-cache/issues/1991

 

 

The solution is very simple add following parameter in “/etc/default/varnish

-a localhost:6081 or -a IP:6081

 

 

DAEMON_OPTS=”-a localhost:6081 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m”

 

Linux Dateisysteme

Hier möchte ich mal einen kleinen Abriss darstellen, es ist schon eine Weile her, als ich das geschrieben habe.  Sollte größtenteils noch passen

Dazu gibt es noch eine Präsi von mir

https://prezi.com/ummt89e6r7jo/linux-unix-dateisysteme/

1. Dateisysteme Allgemein
Linux / Unix Dateisysteme gibt es wie Sand am Meer, es sind über 20 Stück in der Wiki eingetragen, viele davon sind alte Dateisysteme, der Kernel unterstützt diese weiterhin.

Die wichtigsten Dateisysteme unter Linux sind
EXT davon gibt es Version 2, 3, 4
ReiserFS
XFS
Btrfs
VMFS

Unter Unix folgende
VxFS (Veritas File System) HP-UX
UFS (Unix File System)
ZFS (Zettabyte File System)

Unter Linux kann auf FAT Dateisystem lesend und schreibend zugegriffen werden. NTFS Dateisysteme können mit dem Treiber NTFS-3G Zugriff gewährt werden.

Ganz hoch im Kurs steht zurzeit das Dateisystem btrfs. ZFS

2. Dateisysteme im Detail
1. EXT2 Second extended file system
a. Stammt Ursprünglich von Minix ab
b. Januar 1993 veröffentlicht
c. Wird nicht mehr als Standard verwendet
d. Kein Journaling Dateisystem, bei harten ausschalten, langes prüfen notwendig

2. EXT3 third extended filesystem
a. Nur eine Erweiterung von EXT2
b. Journal, Online-Veränderung der Dateisystemgröße
c. 2001 Linux 2.4
d. Standard bei fast allen großen Linux Distris

3. EXT4 fourth extended filesystem
a. 2008
b. Online Defragmentierung
c. TRIM => SSD Support
d. „Extents“ Performance bei großen Dateien, weniger Fragmentierung, da alles in einem Block geschrieben wird
e. Abwärtskompatibel
f. Prüfsummenunterstützung
g. Ext3 Partitionen können als EXT4 gemountet werden und hat so einige Vorteile schon vor ab, ohne neu formatieren zu müssen

4. ReiserFS
a. 2001 2.4
b. Erstes Journaling Filesystem für Linux
c. BSD/Unix nur experimentelle Unterstützung
d. Keine Weiterentwicklung mehr Hans Reiser, sitzt wegen Mordes an seiner Frau Lebenslang.

5. XFS
a. 1994 SGI für Unix Derivate
b. 2001 vollen Linux Support
c. Sehr ausgereiftes Journaling Dateisystem
d. Linux mit ARM ohne XFS Dateisystem, Probleme beim schnellen lesen und schreiben
e. Verzögerte Belegung, Vorteil weniger Fragmentierung, erhöhter Da-tenverlust bei Stromausfall
f. Defragmentierung im Betrieb
g. Anpassung Dateisystem im Betrieb
h. Snapshots
i. Verschlüsselung
Keine verkleinerung der Partition möglich
Copy on Write hinzugekommen

 

6. VMFS VMware File System
a. 2000
b. Nur unter ESX richtig nutzbar
c. 130690 Dateien werden pro Volume unterstützt
d. Open Source Treiber für lesen Verfügbar
e. 2 TB pro Lun V3, V5 64 TB
f. 2 TB pro Datei nur möglich

EXT3 / 4 Dateisystem

Hierzu gibt es einen sehr guten Artikel unter
http://www.heise.de/open/artikel/Das-Dateisystem-Ext3-tunen-221480.html
https://ext4.wiki.kernel.org/index.php/Ext4_Howto
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout
http://kernelnewbies.org/Ext4
http://linux.die.net/man/5/mke2fs.conf
http://www.phoronix.com/scan.php?page=article&item=ext4_btrfs_nilfs2&num=1

Das wichtigste in kürze, EXT2 und EXT3 sind vollständig Kompatibel miteinander. Es ist möglich EXT3 als EXT2 mounten oder EXT2 nachträglich mit einem Journal versehen. EXT3 ist sehr lange erprobt und gilt als sehr bewährtes Dateisystem.
Im obigen Artikel stehen sehr viele Tuning Hinweise. Ext2 kann man sogar bis zur Version 4 hoch stufen. Was nicht geht ist von EXT4 wieder zu 3 oder kleiner zurück zu migrieren.
Zur Konfiguration könnt ihr mit dem Befehl mke2fs und /etc/mke2fs.conf Einfluss nehmen welche Werte immer genommen werden ohne sie jedes Mal explizit angeben zu müssen. Beim Anlegen von neuen EXT3/4 Partitionen.
Wie mounte ich ein EXT3 Dateisystem mit EXT4 ohne zu zu formatieren.
“mount -t ext4 /dev/yourpartition /mnt”. Ein Kernel der EXT4 fähig ist, sollte vorhanden sein. EXT3 Fragmentiert sehr stark bei kleinen Dateien, zwar wird man gesteinigt wenn man nachfrägt in Foren ob es eine Möglichkeit gibt zu defragmentieren. Hier gibt es kein Tool direkt von den EXT3 Machern. Da es damals nicht notwendig schien. Bei EXT4 ist dies möglich im laufenden Betrieb. Gerade für einen Mailserver der sehr viele kleine Dateien bereithält, sollte ein anderes Dateisystem in Betracht gezogen werden. Wo Online Defragmentierung möglich ist.
Btrfs B-tree FS
Wird von Oracle entwickelt. Btrfs zeigt einige große Gemeinsamkeiten zu ZFS auf. Es ist geplant ext3/ect4 damit ab zu lösen. Btrfs ist ein Copy-On-Write Dateisystem. Dateien werden erst mal auf einen freien Speicherbereich geschrieben, danach werden Verweise auf den Block aktualisiert. Bei btrfs gibt es keine Lizenz Probleme wie unter ZFS. B-Baum Struktur wird weiterhin verwendet und ist somit sehr stark verwandt mit ReiserFS, es wurden einige ReiserFS Entwickler von Oracle angestellt um btrfs zu entwickeln. Es gibt immer wieder Verzögerungen die Unterschiedliche Ursachen haben. Seit Kernel 2.6.31 gibt es Support für btrfs im Linux Kernel. Fedora bekannt für frühzeitiges einsetzen neuer Technologien, wird auch in der kommenden Fedora 18 Version nicht als Standard Dateisystem einsetzen. Btrfs kämpft wohl mit einer Design schwäche bei freien Speicherplatz, was immer wieder für Probleme sorgt. Bis wann eine Stabile Version 1.0 kommen wird, kann bis jetzt noch keiner sagen. Hier mal ein paar Features des neuen Dateisystems
• Snapshot
• Mehrere Wurzelverzeichnisse
• Integriertes RAID 0,1 und 10
• Prüfsummen
• Datenkompression
• Dateisystemüberprüfung im Betrieb
• Defragmentierung im Betrieb
• Copy on Write
• Konvertierung von ext3/ext4 Dateisystemen
• TRIM => SSD Support experimentell
Nicht für den Produktiveinsatz
Unix Datei Systeme
Unter Unix gibt es je nach eingesetzten Unix sein eigenes Dateisystem, jeweils vom Hersteller auf die entsprechenden Anforderungen angepasst. Viele Unix Dateisysteme sind nicht Quelloffen sondern stehen unter eigener Lizenz.

1. VxFS Veritas File System (HP-UX, fast alle Unix arten werden unterstützt)
a. 1991
b. Erstes kommerzielles Journaling Dateisystem
c. Online Defragmentierung per Lizenz
d. Anpassung Dateisystem per Lizenz
e. Geplant transparente Komprimierung / Verschlüsselung

2. UFS (Unix File System)
a. 1980
b. Journaling Version 7 ca. 2003
c. Snapshot
d. Weit verbreitet unter BSD Varianten
e. Ext2 ist ein Fork von UFS

 
3. ZFS (Zettabyte File System)
ZFS wurde von Sun Microsystem entwickelt für den Rechenzentrumsbereich. ZFS ist ein 128 Bit Copy on Write Dateisystem. Es ist kein LVM Manager erforderlich. ZFS wurde im Jahr 2006 veröffentlich und ist anderen Dateisystemen Jahre voraus.
ZFS läßt sich extrem leicht administrieren. ZFS benutzt den freien Hauptspeicher des Betriebssystems um Caching Aufgaben zu erledigen. Des Weiteren kann eine SSD für Caching Aufgaben verwendet werden. Dazu wird die SSD eingebaut und mit zwei kurzen Befehlen, weiß ZFS, es ist eine Caching SSD. Der Rest übernimmt das Dateisystem welche Daten darauf gecachet werden. ZFS arbeitet mit Pools, innerhalb eines Pools gibt es beliebige logische Partitionen mit einem Dateisystem welches dynamisch wachsen kann so lange der Pool genügend Platz zur Verfügung stellt.
ZFS bietet ein integriertes RAID an. Unter ZFS wird es RAID-Z genannt. Es wird zwischen belegten und freien Speicherplatzt unterschieden, nur der belegte Platz wird gespiegelt.
Bei einem Ausfall, ist eine schnellere Rekonstruktion möglich. RAD-Z1 ist RAID 5, RAIDZ-2 ist RAID6. Parallelen Zugriff RAID 0 macht ZFS automatisch.
Eine Besonderheit bei ZFS ist Copy on Write erstellten Snapshots. Damit ist es möglich, sofort den Zustand ein zufrieren und diesen Snapshot zum lesen mounten oder zu archi-vieren. ZFS Clone ist eine beschreibbare Snapshot Variante.
Es ist aber auch möglich eine Partition (Snapshot) ohne Probleme in ein ISCSI Target um zu wandeln.
Für Linux selber gibt es aus Lizenz gründen, nur eine Implementierung im User Space. ZFS on Fuse. Es gibt Debian mit einem FreeBSD Kernel dort kann ZFS als Standard Dateisystem gewählt werden. Es gibt auch verschiedene Forks von Open Solaris in denen es möglich ist ZFS zu verwenden. ZFS kann an den Standardmäßig verwendeten Prüfsummen von alleine feststellen ob die Daten noch konsistent sind, sollte dies nicht der Fall sein, so wird aus einem Snapshot eine gleiche Version hergestellt. Dies passiert ohne Eingriff vom Admin. Es wird dann im Log File vermerkt. Das Thema Datenkorruption steht hier ganz vorne. ZFS garantiert, das ein erfolgreich ausgelieferter Block exakt so geliefert wird, wie vor x Jahren gespeichert wurde.
ZFS beherrscht von Hause aus Deduplizierung, auf verschiedenen RAID Level. ZFS ist auf große Datenmengen ausgelegt und braucht daher schnelle Prozessoren und viel Arbeitsspeicher. ZFS sollte nicht unter 8 GB RAM verwendet werden, was vor 4 Jahren noch viel RAM war, ist heute für keine 100 Euro im Serverbereich zu haben.
File Server mit ZFS haben so ca. 200 GB Arbeitsspeicher zur Verfügung. Wer ZFS gerne im Privaten Umfeld nutzen möchte kann dies tun mit Freenas 8.x. Open India bietet sich hier auch an, ein Fork von Open Solaris.
• 2006
• Schnapshot
• Integriertes RAID 0,1 und 10
• End-To-End-Checksummen
• Transparente Datenkompression
• Transparente Verschlüsselung
• Dateisystemüberprüfung im Betrieb
• Defragmentierung im Betrieb
• Copy on Write
• SSD Support
• ISCI Target
• NFS

 

3. Empfehlung / Zukunft Dateisysteme

Eine Grundsätzliche Empfehlung kann so nicht gegeben werden, dies kommt immer auf den geplanten Einsatz an. Als Beispiel man installiert OpenSolaris mit ZFS in eine VM die unter VMWARE läuft, dies bringt einem keine Vorteile. Folgender Software Salat wird dabei zustande kommen.
Netapp stellt die Daten zur Verfügung, durch eine Schicht des Betriebssystems von Netapp. Danach wird der Plattenplatz mit VMWARE VMFS angelegt und nun lege ich auch noch ZFS als Dateisystem darüber. Das dies nicht ideal ist sollte jedem klar sein.
Bei Linux wird es wohl auf ext4 hinaus laufen, da brtfs noch immer nicht Final ist.
Um btrfs richtig nutzen konnte, mußte ich einen Kernel 3.8 einbacken, der 3.2 hat zu sehr gezickt.
Auch sind noch wenige Erfahrungen mit btrfs im produktiven Einsatz vorhanden.
In der Unix Umgebung kommt es ganz auf die Hersteller der Betriebssysteme an, wie hier Support geboten wird. Die Unix Dateisysteme keine Wünsche offen lassen, hier wurde schon viel Früher auf Skalierbarkeit und Wartung gelegt.

sap hybris cache config

Edit your properties file for Hybris to change your cache for better performance

 


# Size of a region that stores all other, non-typesystem and non-query objects. Default value is 100000.
regioncache.typesystemregion.size=500000
# Size of a region that stores all other, non-typesystem and non-query objects. Default value is 100000.
regioncache.entityregion.size=500000
# Size of a region that stores query results. Default value is 20000.
regioncache.querycacheregion.size=500000
# Change eviction policy used by entity region. Possible vales are FIFO (default), LFU and LRU.
# LRU and LFU can be used for EhCacheRegion only. For other region types this setting is ignored.
regioncache.entityregion.evictionpolicy=LRU
regioncache.typesystemregion.evictionpolicy=LRU
regioncache.querycacheregion.evictionpolicy=LFU
# specifies root cache folder for all cached files
media.default.local.cache.rootCacheFolder=cache
# specifies max size of media cache in MB
media.default.local.cache.maxSize=1024