ArcIMS 4
ArcIMS Tips & Tricks
Dan Haag November 12, 2002
Overview
Topics to a better ArcIMS site
Performance Scalability Availability Security Manageability
Case Studies
ArcIMS 4
ArcIMS Evolution
ArcIMS 9 ArcIMS Tracking Server
ArcIMS ArcMap Server ArcIMS 4
2002
ArcIMS Route Server ArcIMS 3.1
ArcIMS 4
2001
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.
Use existing 3.1 config axls & viewers in 4.0. No modifications should be required.
Currently using ArcIMS 3.1:
ArcIMS 4
System Requirements
Microsoft
Windows NT 4.0, 2000, XP Sun Solaris, AIX, HP-UX, Linux Choice of operating system will determine:
Server Java Servlet engine Application Servers Java Runtime Environment (JRE)
Detailed
Web
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
\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
Make sure your spatial index files (.sbn and .sbx) are in sync with your data
Shapefiles
ArcSDE
RDBMS tuning Grid sizes
ArcIMS 4
Steps to Better AXL Tuning
1.
2.
•
Tune your scale dependencies 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.
7.
Minimize the use of antialiasing and transparency 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. 10.
•
Use either pyramided raster types (MrSID, ArcSDE) or uncompressed imagery (TIFF) 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
Simple functionality (pan, zoom, id)—thin Sophisticated geoprocessing—thick
Functionality
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) e
x
x!
• P(x) is the probability of getting x simultaneous requests with an avg. req/s of .
ArcIMS 4
Some Examples
Poisson Distribution of Simultaneous Requests for Different Means
14.00% 12.00% 14 req/s avg.
Probability
10.00% 8.00% 10 req/s avg. 6.00% 4.00% 2.00% 0.00% 0 5 10 15 20 25 30 35 20 req/s avg.
Simultaneous Requests
ArcIMS 4
Some Examples
Reqs/day 10,000 Avg. Reqs/s 1 Max. Reqs/s 5–6
50,000
100,000 215,000 300,000 430,000 500,000 648,000 864,000 1,000,000 1,080,000 1,500,00 2,000,000 2,160,000
3
5 10 14 20 24 30 40 47 50 70 93 100
7– 8
13–14 20–21 26–27 34–35 39–40 47 59 67–68 71 94 120 128
For 300,000 avg. req/day, you will at most get 26–27 simultaneous requests.
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
Retrieval Time Number of Users
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! 10k PNG * 10 = .1MBytes/s = .8Mbits/s = T1
Example 2:
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% Days/Yr Hr/Yr Min/Yr 18.25 438 26280
99% 3.65 87.6 5256
99.5% 1.825 43.8 2628
99.9% 0.365 8.76 525.6
99.99% 0.0365 0.876 52.56
99.999% 0.00365 0.0876 5.256
ArcIMS 4
How to Maximize Availability
Machine availability
Use UPSs on all machines Redundant power supplies Everything hot swappable
Use a RAID configuration
Data availability
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 Consider running multiple ArcIMS AppServers
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
Test new applications under production conditions
Staging
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 breakin? 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
DMZ
Web Server
ArcIMS Server Intranet
ArcIMS 4
Most Popular
Web Server Outside Firewall
Port 5300 Open File sharing from Intranet to Web server for image output
Internet
Intranet
Web Server
AppServer Spatial Server Data
ArcIMS 4
Not Recommended
Connection between AppServer and spatial server persistent
Http
5353
WebServer + AppServer
Spatial Servers
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
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
JDBC-based ACL
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.
ArcIMS 4
Case Studies
One Machine Scenario
Internet
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
ArcIMS 4
Two Machine Scenario
Internet
Capacity
50,000 maps/day (8 max. req/s) 95% availability (18 days/yr)
Web Server AppServer
Configuration
1 machine for Web server and AppServer 1 machine for spatial server and shapefiles
Spatial Server
Can support about 6–8 simultaneous requests
ArcIMS 4
Three Machine + DB Server Scenario
Internet
Capacity
Web Server AppServer
150,000 maps/day (16 max. req/s) 99% availability (3.6 days/yr)
Configuration
Spatial Server
1 machine for Web server and AppServer 2 machines for spatial server 1 ArcSDE server
ArcSDE Server ArcIMS 4
Can support about 16 simultaneous requests
Five Machine + DB Server Scenario
Internet
Requirements
250,000 maps/day (24 max. req/s) 99.5% availability (43 hrs/yr)
Web Servers
AppServer Spatial Server
Configuration
Spatial Servers
2 machines for Web server and AppServer 1 machine as AppServer/spatial server 2 machines for spatial server 1 ArcSDE server
ArcSDE Server ArcIMS 4
Can support about 24 simultaneous requests
A Large Size Mapping System
Web Server
ArcIMS 4
App Servers
Spatial Servers
ArcSDE Server
ESRI Geography Network Node
ArcIMS 4
ESRI Geography Network Node
Global Load Balancer
Redlands
ArcIMS 4
Off-Site Data Center
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
ArcIMS 4