GridGain Developers Hub

GridGain.NET Configuration Options


GridGain.NET nodes can be configured in a variety of ways and then started via configuration-specific Ignition.Start* methods.

Configure Programmatically in C#

Use the Ignition.Start(IgniteConfiguration) method to configure an GridGain.NET node from your C# application.

Ignition.Start(new IgniteConfiguration
    DiscoverySpi = new TcpDiscoverySpi
        IpFinder = new TcpDiscoveryStaticIpFinder
            Endpoints = new[] {""}
        SocketTimeout = TimeSpan.FromSeconds(0.3)
    IncludedEventTypes = EventType.CacheAll,
    JvmOptions = new[] { "-Xms1024m", "-Xmx1024m" }

Configure With Application or Web Config Files

Ignition.StartFromApplicationConfiguration methods read configuration from Apache.Ignite.Core.IgniteConfigurationSection of the app.config or web.config files.

The IgniteConfigurationSection.xsd schema file can be found next to Apache.Ignite.Core.dll in the binary distribution, and in Apache.Ignite.Schema NuGet package. Include it in your project with None build action to enable IntelliSense in Visual Studio while editing IgniteConfigurationSection in the config files.

        <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />

        <gcServer enabled="true"/>

    <igniteConfiguration xmlns="" gridName="myGrid1">
        <discoverySpi type="TcpDiscoverySpi">
            <ipFinder type="TcpDiscoveryStaticIpFinder">

            <cacheConfiguration cacheMode='Replicated' readThrough='true' writeThrough='true' />
            <cacheConfiguration name='secondCache' />


            <pair key='myNode' value='true' />

var ignite = Ignition.StartFromApplicationConfiguration("igniteConfiguration");

Ignite Configuration Section Syntax

The configuration section maps directly to IgniteConfiguration class:

  • Simple properties (strings, primitives, enums) map to XML attributes (attribute name = camelCased C# property name).

  • Complex properties map to nested XML elements (element name = camelCased C# property name).

  • When a complex property is an interface or abstract class, type attribute is used to specify the type, using assembly-qualified name. For built-in types (like TcpDiscoverySpi in the code sample above) assembly name and namespace can be omitted.

  • When in doubt, consult the schema in IgniteConfigurationSection.xsd.

Configure With Spring XML

Spring XML enables the native java-based Ignite configuration method. A Spring config file can be provided via the Ignition.Start(string) method or the IgniteConfiguration.SpringConfigUrl property. This configuration method is useful when some Java property is not natively supported by GridGain.NET.

When the IgniteConfiguration.SpringConfigUrl property is used, the Spring config is loaded first, and other IgniteConfiguration properties are applied on top of it.

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns=""
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="localHost" value=""/>
        <property name="gridName" value="grid1"/>
        <property name="userAttributes">
                <entry key="my_attr" value="value1"/>

        <property name="cacheConfiguration">
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="cache1"/>
                    <property name="startSize" value="10"/>

        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                        <property name="addresses">
                <property name="socketTimeout" value="300" />
var ignite = Ignition.Start("spring-config.xml");