NOAA   ERDDAP   Easier access to scientific data Brought to you by NOAA NMFS SFSC ERD    

ERDDAP: Heavy Loads,
Grids, Clusters, Federations, and
Cloud Computing

ERDDAP is a web application and a web service that aggregates scientific data from diverse local and remote sources
and offers a simple, consistent way to download subsets of the data in common file formats and make graphs and maps.

Heavy Loads / Constraints

With heavy use, a standalone ERDDAP will be constrained (from most to least likely) by:
  1. A remote data source's bandwidth - Unless a remote data source has a very high bandwidth Internet connection,
    ERDDAP's responses will be constrained by how fast ERDDAP can get data from the data source.
    A solution is to copy the dataset onto ERDDAP's hard drive, perhaps with EDDGridCopy or EDDTableCopy.
  2. ERDDAP's server's bandwidth - Unless ERDDAP's server has a very high bandwidth Internet connection,
    ERDDAP's responses will be constrained by how fast ERDDAP can get data from the data sources
    and how fast ERDDAP can return data to the clients.
    The only solution is to get a faster Internet connection.
  3. Memory - If there will be many simultaneous requests, ERDDAP can run out of memory.
    (ERDDAP has a couple of mechanisms to avoid this and to minimize the consequences if it does happen.)
    So the more memory in the server the better: 4+ GB is really good, 2 GB is okay, less is not recommended.
    See the -Xmx setting for ERDDAP/Tomcat.
    Thus the current absolute maximum setting of approximately -Xmx1500M is probably the biggest unfixable limitation.
    In setup.xml, see the <partialRequestMaxBytes> and <partialRequestMaxCells> .
  4. Too many files in a cache directory - ERDDAP caches all images, but only caches the data for certain types of data requests.
    It is possible for the cache directory for a dataset to have a large number of files temporarily.
    This will slow down requests to see if a file is in the cache (really!).
    <cacheMinutes> in setup.xml lets you set how long a file can be in the cache before it is deleted.
    Setting a smaller number would minimize this problem.
  5. CPU - Making graphs is the only thing that takes significant CPU time (roughly 1 second per graph).
    So if there were many simultaneous unique requests for graphs, there could be a CPU limitation.
    On a multi-core server, it would take a lot of requests before this became a problem.
  6. Hard drive bandwidth - Accessing data stored on the server's hard drive is vastly faster than accessing remote data.
    Even so, if the ERDDAP server has a very high bandwidth connection, it is possible that accessing data on the hard drive will be a bottleneck.
    A partial solution is to use fast (e.g., 10,000 RPM) hard drives.
     

Grids, Clusters, and Federations

Under very heavy use, a single standalone ERDDAP will run into one or more of the constraints listed above
and even the suggested solutions will be insufficient.
For such situations, ERDDAP has features that make it easy to construct scalable grids
(also called clusters or federations) of ERDDAPs which allow the system to handle very heavy use
(e.g., for a large data center).

We're using the term grid to indicate a type of computer cluster where all of the parts may or may not
be physically located in one facility and may or may not be centrally administered.
An advantage of co-located, centrally owned and administered grids (clusters)
is that they benefit from economies of scale (especially the human workload)
and simplify making the parts of the system work well together.
An advantage of non-co-located grids, non-centrally owned and administered (federations)
is that they distribute the human work load and the cost, and may provide some additional fault tolerance.
The solution we propose below works well for all grid topographies.

The basic idea of designing a scalable system is to identify the potential bottlenecks
and then design the system so that parts of the system can be replicated as needed to alleviate the bottlenecks.
Ideally, each replicated part increases the capacity of that part of the system linearly (efficiency of scaling).
The system isn't scalable unless there is a scalable solution for every bottleneck.
Scalability is different from efficiency (how quickly a task can be done -- efficiency of the parts).
Scalability allows the system to grow to handle any level of demand.
Efficiency (of scaling and of the parts) determines how may servers, etc., will be needed to meet a given level of demand.
Efficiency is very important, but always has limits.
Scalability is the only practical solution to building a system that can handle very heavy use.
Ideally, the system will be scalable and efficient.

The goals of this design are:

Our suggestion is:
grid/cluster diagram
Basically, we suggest setting up a Composite ERDDAP (D in the diagram),
which is a regular ERDDAP except that it just serves data from other ERDDAPs.
The grid's architecture is designed to shift as much work as possible
(CPU usage, memory usage, bandwidth usage) from the Composite ERDDAP to the other ERDDAPs.
ERDDAP has two special dataset types, EDDGridFromErddap and EDDTableFromErddap,
which refer to datasets on other ERDDAPs.
When the composite ERDDAP receives a request for data or images from these datasets,
the composite ERDDAP redirects the data request to the other ERDDAP server.
The result is:

The parts of the grid are:

A) For every ERDDAP data source that has a high-bandwidth server,
use EDDGridFromErddap or EDDTableFromERDDAP to serve the data in the Composite ERDDAP.

B) For every ERDDAP-able data source (a data source from which ERDDAP can read data) that has a high-bandwidth server,
set up another ERDDAP in the grid which is responsible for serving the data from this data source.

C) For every ERDDAP-able data source that has a low-bandwidth server (or is a slow service for other reasons),
consider setting up another ERDDAP and storing a copy of the dataset on that ERDDAP's hard drive using
EDDGridCopy and/or EDDTableCopy.
If several such ERDDAPs aren't getting many requests for data, you can consolidate them into one ERDDAP.

D) The composite ERDDAP is a regular ERDDAP except that it just serves data from other ERDDAPs.

Datasets In Very High Demand - In the really unusual case that one of the A, B, or C ERDDAPs
can't keep up with the requests because of bandwidth or hard drive limitations,
it makes sense to copy the data (again) on to another server+hardDrive+ERDDAP, using
EDDGridCopy and/or EDDTableCopy.
While it may seem ideal to have the original dataset and the copied dataset appear
seamlessly as one dataset in the composite ERDDAP, this is difficult because
the two datasets will be in slightly different states at different times
(notably, after the original gets new data, but before the copied dataset gets its copy).
Therefore, we recommend that the datasets be given slightly different titles
(e.g., "... (copy #1)" and "... (copy #2)", or perhaps "(mirror #n)" or "(server #n)")
and appear as separate datasets in the composite ERDDAP.
Users are used to seeing lists of mirror sites at popular file download sites, so this shouldn't surprise or disappoint them.
Because of bandwidth limitations at a given site, it may make sense to have the mirror located at another site.
If the mirror copy is at a different data center, accessed just by that data center's composite ERDDAP,
the different titles (e.g., "mirror #1) aren't really necessary.

RAIDs vs. Regular Hard Drives - If a large dataset or a group of datasets are not heavily used,
it may make sense to store the data on a RAID since it offers fault tolerance
and since you don't need the processing power or bandwidth of another server.
But if a dataset is heavily used,
it may make more sense to copy the data on another server + ERDDAP + hard drive (similar to what Google does)
rather than to use one server and a RAID to store multiple datasets
since you get to use both server+hardDrive+ERDDAPs in the grid until one of them fails.

Failures - What happens if...

Simple, Scalable - This system is easy to set up and administer, and easily extensible when any part of it becomes over-burdened.
The only real limitation for a given data center is the data center's bandwidth.

Bandwidth - Note the approximate bandwidth of commonly used components of the system:

ComponentBandwidth (GBytes/s)
DDR memory~2.5
SATA hard drive0.3
Gigabit Ethernet0.1
OC-192 (ISP)1
OC-120.06
OC-30.015
T10.0002

So, one SATA hard drive (0.3GB/s) on one server with one ERDDAP can probably saturate a Gigabit Ethernet LAN (0.1GB/s).
And one Gigabit Ethernet LAN (0.1GB/s) can probably saturate an OC-12 Internet connection (0.06GB/s).
And at least one source lists OC-12 lines costing about $100,000 per month.
(Yes, these calculations are based on pushing the system to its limits, which is not good
because it leads to very sluggish responses.
But these calculations are useful for planning and for balancing parts of the system.)
Clearly, a suitably fast Internet connection for your data center is by far the most expensive part of the system.
You can easily and relatively cheaply build a grid with a dozen servers running a dozen ERDDAPs
which is capable of pumping out lots of data quickly, but a suitably fast Internet connection will be very, very expensive.
(Fun fact: ERD, which hosts several data servers including an ERDDAP, currently has just a fractional OC-3, ~0.001 GB/s.
ERD is bandwidth limited.)
The partial solutions are:
Note that Cloud Computing and web hosting services offer all the Internet bandwidth you need, but don't solve the price problem.

For general information on designing high capacity, fault-tolerant systems, see Michael T. Nygard's book Release It.

[Yes, these are simplistic calculations, but I think the conclusions are correct.
Did I use faulty logic or make a mistake in my calculations? If so, the fault is mine alone.
Please send an email with the correction to bob dot simons at noaa dot gov.]
 

Cloud Computing

Several companies are starting to offer cloud computing services (e.g., Amazon Web Services).
Web hosting companies have offered a range of roughly similar services since the mid-1990's.
Since the ERDDAP grid just consists of ERDDAPs and since ERDDAPs are Java web applications that run in Tomcat
(the most common application server) or other application servers, it should be relatively easy to set up
an ERDDAP grid on a cloud service or web hosting site.
The advantages of these services are:
The disadvantages of these services are:
 

Thanks - Many thanks to Matthew Arrott and his group for their work on putting ERDDAP in the cloud and the resulting discussions.


Contact

Yes, these are simplistic calculations, but I think the conclusions are correct.
Did I use faulty logic or make a mistake in my calculations? If so, the fault is mine alone.
Please send an email with the correction to bob dot simons at noaa dot gov.

Questions, comments, suggestions? Contact bob dot simons at noaa dot gov.

ERDDAP is a brought to you by NOAA NMFS SFSC ERD.
Privacy Policy