Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A couple of configuration options have to be set in order to have Fedora 4 work as a cluster on a local machine:

  • -Xmx1024m Set the Java heap to 1GB 
  • -XX:MaxPermSize=256m Set the Java PermGen size to 256MB
  • fcrepo-Dfcrepo.modeshape.configuration=file:///path/to/repository.json The Modeshape configuration used for clustering
  • java-Djava.net.preferIPv4Stack=true Tell Java to use IPv4 rather than IPv6
  • fcrepo.ispn.jgroups.configuration=/path/to/jgroups-fcrepo-tcp.xml Set the JGroups configuration file holding the TCP Transport defintions
  • jgroups.udp.mcast_addr=239.42.42.42 Set the UDP multicast address for the JGroups cluster
  • fcrepo.infinispan.cache_configuration=/path/to/infinispan.xml Set the Infinispan configuration file holding the Infinispan cluster configuration

...

If you use a hostname for bind_addr, make sure that it resolved to the IP you want, probably an external one and not the loopback IP. This is easy to miss.

 

Deploying in AWS

Java options for Tomcat or Jetty

Code Block
JAVA_OPTS="$JAVA_OPTS -Xmx1024m -XX:MaxPermSize=256m -Dfcrepo.modeshape.configuration=classpath:/config/clustered/repository.json"
JAVA_OPTS="$JAVA_OPTS -Dfcrepo.infinispan.cache_configuration=config/infinispan/clustered/infinispan.xml"

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.home=/tmp/wherever"

JAVA_OPTS="${JAVA_OPTS} -Djgroups.tcp.address=<private-ip-address-of-ec2-instance>"

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.numOwners=2 -Djava.net.PreferIPv4Stack=true"

# The jgroups-ec2.xml file is included in ispn's jars
JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.jgroups.configuration=jgroups-ec2.xml"

# This property overwrites the S3 bucketname variable in jgroups-ec2.xml
JAVA_OPTS="${JAVA_OPTS} -Djgroups.s3.bucket=<some-bucket-that-you-have-already-created>"

 

Load Balancing Fedora 4 using Apache and mod_jk

...