Skip to content
This repository was archived by the owner on May 2, 2024. It is now read-only.

Admin: System Configuration

Benjamin Sautner edited this page Mar 7, 2017 · 4 revisions

Configuring Your Nimbits Instance

You can customize how your nimbits instance behaves by editing the file: application.properties

If you installed nimbits with our install script with the default options (tomcat etc) the file is located

/opt/tomcat/webapps/nimbits/WEB-INF/classes/application.properties after installation. This file may be over-written on upgrades so it's a good idea to back it up and replace it after upgrades and then restart your web server.

example:

$vi /opt/tomcat/webapps/nimbits/WEB-INF/classes/application.properties  
$sudo service tomcat8 restart

In this file, you can change:

  • Database Connections and drivers
  • Outbound email smtp connections
  • Enable or Disable the Register New User button on login to the web portal
  • Configure background tasks - see below

Configuring background tasks

Nimbits Server has a heartbeat task that runs in the background on the server and does various work including:

  • Processing idle alerts, statistics, and timed events
  • Deleting expired data

In a Load Balanced / High Availability Environment you may have many instances of Nimbits running and they can share the work between them. The instances will shard the pending work, marking chunks of work that it is working on so other instances won't process them and then marking them as complete.

Work that is processed is marked with a current timestamp, and work is picked up based on the oldest timestamps, so it is more likely that work will be done in a timely manner and work that takes a long time to complete won't block other tasks.

Based on your use cases, you may edit these properties:

system.task.idle.enabled=true
system.task.idle.initialDelay=1000
system.task.idle.fixedRate=5000
system.task.idle.limit=1000

This tells the instance to

  • Process idle alert subscriptions
  • Start processing after a delay of 1 second
  • Look for idle alerts to process every 5 seconds
  • Process 1000 idle alerts at a time.

In a load balanced environment, each instance will split the work up so alerts are processed in a timely manner.

Task Pools

When making asynchronous calls to the API, data is processed in a new background thread. You can tune your system to avoid maxing out resources by editing this file:

nimbits_server/src/main/webapp/WEB-INF/applicationContext.xml

<bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="5" />
        <property name="maxPoolSize" value="1000" />
        <property name="queueCapacity" value="250" />
    </bean>

This will change how your system handels task pools. For more information about Task Pooling see:

Task Execution Spring Documents

Clone this wiki locally