Chapter 9. Data Grid Server Reference
9.1. Data Grid Server
Data Grid server provides fast, reliable, and secure access to your data. This release of the server improves on previous versions and offers:
- Small code-base with minimal duplication of existing functionality (e.g. configuration).
- Embeddable: the server should allow for easy testability in both single and clustered configurations.
- RESTful administration capabilities.
- Logging with Apache Log4j 2.
- Security with WildFly Elytron SPIs.
9.1.1. Directory Structure
Server distributions have the following directory structure:
-
/bin
: scripts to start the server and create/modify users. -
/boot
:JAR
files to boot the server. -
/docs
: examples and component licenses. -
/lib
: serverJAR
files. /server
: default server instance folder.-
/server/conf
: configuration files. -
/server/data
: data files organized by container name. -
/server/lib
: extensionJAR
files for custom filters, listeners, and so on. -
/server/log
: server log files.
-
9.1.2. Server Paths
Servers use the following paths:
-
infinispan.server.home
defaults to the directory that contains the server distribution. infinispan.server.root
contains configuration and data for Data Grid servers and defaults to theserver
directory underinfinispan.server.home
.
Multiple roots can exist in the same or different directories. To start multiple server instances you can specify the path toinfinispan.server.root
with a command line argument.NoteWhen the server starts it locks
infinispan.server.root
to avoid concurrent use by multiple server instances.-
infinispan.server.configuration
defaults toinfinispan.xml
, which resides in theconf
folder underinfinispan.server.root
.
9.1.3. Command Arguments
The server.sh|bat
startup script includes arguments that you can use to get information and configure the server runtime environment.
To view the available command arguments, include the --help
or -h
option as follows:
$ bin/server.sh -h
9.1.4. Logging Configuration
You configure logging with log4j2.xml
in the server/conf
directory.
9.1.5. Configuration
The server configuration extends the standard Data Grid configuration with the following server-specific elements:
-
security
configures the available security realms for the endpoints. -
cache-container
multiple containers may be configured, distinguished by name. -
endpoints
lists the enabled endpoint connectors (hotrod, rest, and so on). -
socket-bindings
lists the socket bindings.
The following is an example server configuration:
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:10.1 https://infinispan.org/schemas/infinispan-config-10.1.xsd urn:infinispan:server:10.1 https://infinispan.org/schemas/infinispan-server-10.1.xsd" xmlns="urn:infinispan:config:10.1" xmlns:server="urn:infinispan:server:10.1"> <cache-container default-cache="default" statistics="false"> <transport cluster="${infinispan.cluster.name}" stack="udp"/> <global-state/> <distributed-cache name="default"/> </cache-container> <server xmlns="urn:infinispan:server:10.1"> <interfaces> <interface name="public"> <loopback/> </interface> <interface name="admin"> <loopback/> </interface> </interfaces> <socket-bindings default-interface="public" port-offset="${infinispan.socket.binding.port-offset:0}"> <socket-binding name="hotrod" port="11222"/> <socket-binding name="rest" port="8080"/> <socket-binding name="memcached" port="11221"/> <socket-binding name="admin" port="9990" interface="admin"/> </socket-bindings> <security> <security-realms> <security-realm name="ManagementRealm"> <properties-realm groups-attribute="Roles"> <user-properties path="mgmt-users.properties" relative-to="infinispan.server.config.dir" plain-text="true"/> <group-properties path="mgmt-groups.properties" relative-to="infinispan.server.config.dir" /> </properties-realm> </security-realm> <security-realm name="PublicRealm"> <properties-realm groups-attribute="Roles"> <user-properties path="public-users.properties" relative-to="infinispan.server.config.dir" plain-text="true"/> <group-properties path="public-groups.properties" relative-to="infinispan.server.config.dir" /> </properties-realm> <server-identities> <ssl> <keystore path="application.keystore" relative-to="infinispan.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/> </ssl> </server-identities> </security-realm> </security-realms> </security> <endpoints> <hotrod-connector socket-binding="hotrod"/> <memcached-connector socket-binding="memcached"/> <rest-connector socket-binding="rest"/> </endpoints> </server> </infinispan>
9.1.6. Additional Details
The following is a list of additional details about the server, in no particular order:
- All containers handled by the same server share the same thread pools and transport.