ArcIMS Tips & Tricks

quicksandwalleyeInternet and Web Development

Oct 31, 2013 (3 years and 10 months ago)

156 views

ArcIMS Tips & Tricks


Dan Haag

November 12, 2002

ArcIMS 4

ArcIMS 4

Overview


Topics to a better ArcIMS site


Performance


Scalability


Availability


Security


Manageability



Case Studies

ArcIMS 4

ArcIMS ArcMap Server

ArcIMS Route Server

ArcIMS 3.1

ArcIMS 4

2001

2002

ArcIMS 9

ArcIMS Tracking Server

ArcIMS

Evolution

ArcIMS 4

Migrating from previous versions


Currently using ArcIMS 3.0:



Wait until you receive ArcIMS 4. Migrate directly
from ArcIMS 3.0 to 4, following instructions for 3.0
to 3.1 migration. Migrating pdf available at
support.esri.com
.


Currently using ArcIMS 3.1:



Use existing 3.1 config axls & viewers in 4.0. No
modifications should be required.

ArcIMS 4

System Requirements


Microsoft Windows NT 4.0, 2000, XP


Sun Solaris, AIX, HP
-
UX, Linux


Choice of operating system will determine:


Web Server


Java Servlet engine


Application Servers


Java Runtime Environment (JRE)


Detailed requirements at
support.esri.com

ArcIMS 4

Installation Tips … General


Uninstall ArcIMS 3.1/3.0 completely


Uninstall Servlet Engine & JRE


Install ArcIMS 4.0


Use Site Converter Utility to transfer existing
serialization files to new format if desired.


Migrate Viewers & config axl files if going from 3.0
to 4.0


ArcIMS 4

Installation Tips


Install JRE before anything else


JRE 1.3.1 ships with ArcIMS


Make sure that Web server is up and running


Use default port 80 for web server, different one for
additional servers


Hit
http://localhost

to ensure web server is running, or
use web server’s management tool.


Make sure that the servlet engine is correctly
installed and configured with the web server


Can only have ONE servlet engine configured


ArcIMS 4

More Installation Tips


Use test servlets that come with software


Example: ServletExec, test with


http://localhost/servlet/TestServlet


http://localhost/servlet/DateServlet


Make sure virtual directories are in place


Adequate system resources for ArcIMS Spatial Servers


Network security issues: Firewalls, DNS issues


Use the ArcIMS Diagnostics Page:


C:
\
Program
Files
\
ArcGIS
\
ArcIMS
\
Common
\
Diagnostics
\
ArcIMS_Diagnostics.html


Majority of installation problems start and end here!!!


ArcIMS 4

Performance


How long does a request take?


Perceived vs. actual performance



Focus on getting the fastest single user
performance by


Tuning your data


Tuning your AXLs


Choosing your client applications

ArcIMS 4

Spatial Server Log Files


Use your spatial server log files to determine
performance and “hot spots”


Most popular map services


Slowest map services


Slowest layers


Located in the <ArcIMS>
\
Server
\
log or
$AIMSHOME/log directory


One log file for each server type: image, feature, query,
geocode, extract, arcmap, metadata


Provide a record of all requests and responses


First place to go if there’s a problem with the response

ArcIMS 4

Turning Log Files on


Log files, by default, only log errors


To log all requests and responses:


Open aimsserver.cfg in server
\
etc directory


Change logfiles=“errors” to logfiles=“on”


Restart monitor and appserver


More details on log files are available at
http://support.esri.com/


Type in the key words “log files”

ArcIMS 4

Tune Your Data


Data


Generalize data by reducing features and/or vertices


Shapefiles


Make sure your spatial index files (.sbn and .sbx) are
in sync with your data


ArcSDE


RDBMS tuning


Grid sizes

ArcIMS 4

Steps to Better AXL Tuning

1.
Tune your scale dependencies

2.
Where clause vs. Valuemaps


Use where clauses when you can reduce the number of
features found.

3.
SPATIALQUERY’s searchorder attribute (ArcSDE
only)


Use “attributefirst” if the query will reduce the amount of
features queried more than the filter.

4.
Use Strings & Integers in Valuemaps


ArcIMS 4

Steps to Better AXL Tuning

5.
Use Featurelimits for large layers


To avoid having large queries bog down your
system

6.
Minimize the use of antialiasing and
transparency

7.
Minimize multilayered symbols


Cased highways, etc.



ArcIMS 4

Steps to Better AXL Tuning

8.
Choose the right output image (GIF, JPG,
PNG
-
8 bit, PNG
-
24 bit)


JPG, PNG
-
24 bit for > 256 Colors


GIF, PNG
-
8 bit for < 256 Colors

9.
Use either pyramided raster types (MrSID,
ArcSDE) or uncompressed imagery (TIFF)

10.
Avoid projection on the fly


Store data in geographic coordinates (WGS84) if
possible.


ArcIMS 4

Tune Your Viewers


Choose the client that’s right for your
applications:


Thick

Java, ActiveX, ArcExplorer, ArcGIS


Thin

JavaScript, DHTML


Server Side

HTML from ColdFusion,





JSP, ASP…

ArcIMS 4

Tune Your Viewers


Bandwidth


28.8k connection use server side or thin


DSL or Intranet can use thick


Functionality


Simple functionality (pan, zoom, id)

thin


Sophisticated geoprocessing

t
hick

ArcIMS 4

Tune Your Viewers


Default viewers are meant to be generic.


Modify them so that they are optimized for your
data and application.


If you need major customization, use the server
side connectors (Java, ActiveX, or ColdFusion).


ArcIMS 4

Scalability


How can you maintain your single user
performance across multiple users?


Tune your ArcIMS instances


Hardware (capacity planning)


ArcIMS 4

Understanding Instances

ArcIMS 4

Understanding Instances

ArcIMS 4

How Many ArcIMS Instances Do I
Need?


Answer: Approximately one for each simultaneous
request



Simultaneous users are not the same as simultaneous requests!



Can estimate simultaneous requests from average
requests per day



Example: 300,000 avg. req/day

ArcIMS 4

Average Request/Second

Estimate


From avg. req/day find avg. req/s



Might use 80/20 rule


80% of Web traffic occurs 20% of the time



For 300,000 avg. req/day, this is 14 avg. req/s.

ArcIMS 4

Maximum Request/Second

Estimate


Poisson distribution can be used to estimate the
maximum req/s.


P(x) is the probability of getting x
simultaneous requests with an avg.
req/s of
.

ArcIMS 4

Some Examples

ArcIMS 4

Some Examples


For 300,000 avg.
req/day, you will at
most get 26

27
simultaneous
requests.

Reqs/day


Avg. Reqs/s


Max. Reqs/s


10,000


1


5

6


50,000


3


7


8


100,000


5


13

14


215,000


10


20

21


300,000


14


26

27


430,000


20


34

35


500,000


24


39

40


648,000


30


47


864,000


40


59


1,000,000


47


67

68


1,080,000


50


71


1,500,00


70


94


2,000,000


93


120


2,160,000


100


128


ArcIMS 4

What Does All This Mean?


For 300,000
-
> expect 27 requests/second


Need to scale your ArcIMS site to handle 27
simultaneous requests:


Set the number of instances to 27 if you don’t want
requests to wait in the queue

ArcIMS 4

How Many ArcIMS Machines
Do I Need?



Rule of thumb


4

8 instances of ImageServer per CPU


5

15 instances of FeatureServer per CPU


No more than 10 instances per spatial server



Some variables affect this

ArcIMS 4

Scalability Factors


ArcSDE vs. Shapefiles


Shapefiles


Faster setup


Faster single hit performance


More CPU usage on MapServer


ArcSDE


Better maintainability


Better scalability


Offset CPU to DB server

Number of Users

Retrieval Time

ArcIMS 4

Scalability Factors


Vector vs. Raster


Raster decompression (MrSID, JPG, etc.) requires
more CPU on spatial server.



FeatureServer vs. ImageServer


FeatureServer only retrieves features and streams
them (compressed or decompressed).


ImageServer retrieves and renders features and
therefore takes more CPU.

ArcIMS 4

Other Scalability Factors


Serverside business logic


ColdFusion/JSP/ASP


Extra processing on Web server machines

ArcIMS 4

Other Scalability Factors


Make sure you have enough bandwidth


ImageServer


Average Image Size * req/s = Mbits/s


Example 1:



100k JPG * 50 = 5MBytes/s = 40Mbits/s = Large T3!


Example 2:


10k PNG * 10 = .1MBytes/s = .8Mbits/s = T1


FeatureServer


Depends


Compression ~10

20 times


Number of features transferred

ArcIMS 4

Virtual Servers


What are they?


Groups of instances across machines



Why do we need them?


To be able to assign services to different spatial
servers/machines

ArcIMS 4

Virtual Servers


Recommendation


Use only the default virtual server



Except if


Need to prioritize services


e.g., Services A and B are more important and need to run
on the 1.5 GHz machine. Services C and D are less
important and can run on the 133 MHz machine.



ArcIMS 4

Availability


How much time is your site available for use?


Components
will

fail.



Often measured in percentage uptime.




95%


99%


99.5%


99.9%


99.99%


99.999%


Days/Yr


18.25


3.65


1.825


0.365


0.0365


0.00365


Hr/Yr


438


87.6


43.8


8.76


0.876


0.0876


Min/Yr


26280


5256


2628


525.6


52.56


5.256


ArcIMS 4

How to Maximize Availability


Machine availability


Use UPSs on all machines


Redundant power supplies


Everything hot swappable


Data availability


Use a RAID configuration


Level 0

striping


Level 1

mirroring


Level 5

parity


Level 0+1

mirrored and striped

ArcIMS 4

Application Availability


Web servers


Multiple Web servers with a load balancer



ArcIMS availability


Distribute components on different machines


Multiple spatial servers


Always run multiple spatial servers


Distribute spatial servers on multiple machines


Multiple ArcIMS AppServers


Consider running multiple ArcIMS AppServers

ArcIMS 4

Network Availability


Multiple Internet Connections


Backup Firewalls


Backup Routers


Backup Switches


ArcIMS 4

Staging & Production


Never ever develop and test on your production
system.




Development


Develop and test new applications


Staging


Test new applications under production conditions


Production


Move to production when ready

ArcIMS 4

Monitor, Monitor, Monitor


Even if Web site is designed for 99.999%
availability, things will still fail.


Monitoring can be done using


Simple scripts: perl, awk, bat


Commercial tools (SNMP, etc.)


Alerts can easily be sent to a pager

ArcIMS 4

Security


How secure is your site?


How long would it take for someone to break
-
in?


What would be the costs related to a break
-
in?



ArcIMS 4

Firewalls


A firewall allows control of access to a machine
from the network.


It filters out packets of data based on a set of
rules.


For instance: allow all access to port 80 (http) and
disallow all other ports on the system (ftp, telnet,
etc.).


ArcIMS 4

Recommend: DMZ Network

Internet

Intranet

DMZ

Web
Server

ArcIMS
Server

ArcIMS 4

Most Popular

Internet

Intranet

Web
Server

AppServer

Spatial Server

Data



Web Server Outside Firewall


Port 5300 Open


File sharing from Intranet to Web server for
image output

ArcIMS 4

Not Recommended


Connection between AppServer and spatial
server persistent

5353

Spatial Servers

Http

WebServer
+ AppServer

ArcIMS 4

Service Authentication


Access to ArcIMS services can be restricted


Only people with proper credentials can access
services


If information for accessing service is not correct,
request is not sent to the ArcIMS Application
Server, and an error message is returned to client


Process is called authentication


ArcIMS 4

Limiting Access


By user name and password


By IP address


By setting an expiration date


By limiting the number of times a user can
access the MapService


By limiting request elements such as
GET_IMAGE or GET_FEATURES


ArcIMS 4

Access Control List (ACL)


Text file based


XML based using XML elements


File is loaded in memory


Cumbersome to manage with many users


Must restart servlet engine after every change


JDBC
-
based ACL


Store permissions in a relational database accessed through a
JDBC driver


Easier to manage large number of users


Changes can be made without restarting the servlet engine


If ACL is used, services are not accessible unless listed


ArcIMS 4

ArcIMS Authentication


Use Digest Authentication


Not Basic



Use the RDBMS Acl over the file
-
based Acl


Can dynamically add/remove/update users


Single place to store privileges

ArcIMS 4

Manageability


How manageable is your system?


Use fewer machines!


Use standard paths on all machines.


Come up with a standard methodology for
installations, patches, etc.


Document all installs and changes made.


Case Studies

ArcIMS 4

One Machine Scenario


Capacity


30,000 maps/day (6 max. req/s)


95% availability (18 days/yr)



Configuration


1 machine running everything
(Web server, ArcIMS, shapefiles)



Can support about 4

6
simultaneous requests

Internet

ArcIMS 4

Two Machine Scenario


Capacity


50,000 maps/day (8 max. req/s)


95% availability (18 days/yr)



Configuration


1 machine for Web server and
AppServer


1 machine for spatial server and
shapefiles



Can support about 6

8
simultaneous requests

Internet

Web Server

AppServer

Spatial

Server

ArcIMS 4

Three Machine + DB Server Scenario


Capacity


150,000 maps/day (16 max.
req/s)


99% availability (3.6 days/yr)



Configuration


1 machine for Web server and
AppServer


2 machines for spatial server


1 ArcSDE server



Can support about 16
simultaneous requests

Internet

Web Server

AppServer

Spatial

Server

ArcSDE

Server

ArcIMS 4

Five Machine + DB Server Scenario


Requirements


250,000 maps/day (24 max. req/s)


99.5% availability (43 hrs/yr)



Configuration


2 machines for Web server and
AppServer


1 machine as AppServer/spatial
server


2 machines for spatial server


1 ArcSDE server



Can support about 24
simultaneous requests

Internet

Web Servers


ArcSDE

Server

AppServer

Spatial Server

Spatial

Servers

ArcIMS 4

A Large Size Mapping System

ArcSDE
Server

Spatial
Servers

Web Server

App
Servers

ArcIMS 4

ESRI Geography Network Node

ArcIMS 4

ESRI Geography Network Node

Global Load

Balancer

Off
-
Site Data Center

Redlands

ArcIMS 4

Hardware Configuration


Data servers


Sun Ultra Enterprise 6500s


12

360 MHz Processors


8 GB of Random Access Memory


1 TB of Disk Storage



Web servers


U220Rs, E250s


1 GB

2 GB RAM


2

450 MHz Processors

ArcIMS 4

Hardware Configuration


AppServers/Spatial Servers


E450s, U420Rs


4 GB RAM


4

450 MHz Processors



Spatial Servers


E250s, U220Rs, U420Rs


2 GB RAM


2

450 MHz Processors

ArcIMS 4

Site Stats


Machines: 44


Maps generated per day: 1M+


Peak per hours: 100k+


Average map generation time: 1.6s


Map services: 130


Availability requirements: 99.5%



Estimated capacity per day: 5M+

ArcIMS 4

Need more information….

ESRI’s Web Site:
www.esri.com

ArcIMS Resources:
support.esri.com

Dan Haag

Phone: 636
-
949
-
6620 x8523

Email:
dhaag@esri.com