ArcIMS ArcMap Server - University of Missouri

Download Report

Transcript ArcIMS ArcMap Server - University of Missouri

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.
Currently using ArcIMS 3.1:

ArcIMS 4
Use existing 3.1 config axls & viewers in 4.0. No
modifications should be required.
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
ArcIMS 4
requirements at support.esri.com
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






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:


http://localhost/servlet/TestServlet
http://localhost/servlet/DateServlet
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/

ArcIMS 4
Type in the key words “log files”
Tune Your Data

Data


Shapefiles


Generalize data by reducing features and/or vertices
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
Tune your scale dependencies
Where clause vs. Valuemaps
1.
2.
•
SPATIALQUERY’s searchorder attribute (ArcSDE
only)
3.
•
4.
ArcIMS 4
Use where clauses when you can reduce the number of
features found.
Use “attributefirst” if the query will reduce the amount
of features queried more than the filter.
Use Strings & Integers in Valuemaps
Steps to Better AXL Tuning
5.
Use Featurelimits for large layers
•
6.
7.
Minimize the use of antialiasing and
transparency
Minimize multilayered symbols
•
ArcIMS 4
To avoid having large queries bog down your
system
Cased highways, etc.
Steps to Better AXL Tuning
Choose the right output image (GIF, JPG,
PNG-8 bit, PNG-24 bit)
8.


JPG, PNG-24 bit for > 256 Colors
GIF, PNG-8 bit for < 256 Colors
Use either pyramided raster types (MrSID,
ArcSDE) or uncompressed imagery (TIFF)
Avoid projection on the fly
9.
10.
•
ArcIMS 4
Store data in geographic coordinates (WGS84) if
possible.
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


ArcIMS 4
Simple functionality (pan, zoom, id)—thin
Sophisticated geoprocessing—thick
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%
Probability
12.00%
14 req/s avg.
10.00%
8.00%
10 req/s avg.
6.00%
4.00%
20 req/s avg.
2.00%
0.00%
0
5
10
15
20
25
Simultaneous Requests
ArcIMS 4
30
35
Some Examples
ArcIMS 4
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

For 300,000 avg.
req/day, you will at
most get 26–27
simultaneous
requests.
What Does All This Mean?


For 300,000 -> expect 27 requests/second
Need to scale your ArcIMS site to handle 27
simultaneous requests:

ArcIMS 4
Set the number of instances to 27 if you don’t want
requests to wait in the queue
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


ArcIMS 4
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
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:


Example 2:


10k PNG * 10 = .1MBytes/s = .8Mbits/s = T1
FeatureServer

Depends


ArcIMS 4
100k JPG * 50 = 5MBytes/s = 40Mbits/s = Large T3!
Compression ~10–20 times
Number of features transferred
Virtual Servers

What are they?


Groups of instances across machines
Why do we need them?

ArcIMS 4
To be able to assign services to different spatial
servers/machines
Virtual Servers

Recommendation


Use only the default virtual server
Except if

Need to prioritize services

ArcIMS 4
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.
Availability

How much time is your site available for use?
Components will fail.

Often measured in percentage uptime.

ArcIMS 4
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
How to Maximize Availability

Machine availability




Use UPSs on all machines
Redundant power supplies
Everything hot swappable
Data availability

Use a RAID configuration




ArcIMS 4
Level 0—striping
Level 1—mirroring
Level 5—parity
Level 0+1—mirrored and striped
Application Availability

Web servers


Multiple Web servers with a load balancer
ArcIMS availability


Distribute components on different machines
Multiple spatial servers



Multiple ArcIMS AppServers

ArcIMS 4
Always run multiple spatial servers
Distribute spatial servers on multiple machines
Consider running multiple ArcIMS AppServers
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


Staging


Develop and test new applications
Test new applications under production conditions
Production

ArcIMS 4
Move to production when ready
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.

ArcIMS 4
For instance: allow all access to port 80 (http) and
disallow all other ports on the system (ftp, telnet,
etc.).
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

Intranet
Internet
Web
Server
ArcIMS 4
AppServer
Spatial Server
Data
Not Recommended

Connection between AppServer and spatial
server persistent
Http
5353
WebServer
+ AppServer
ArcIMS 4
Spatial Servers
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





JDBC-based ACL




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
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


ArcIMS 4
1 machine running everything
(Web server, ArcIMS, shapefiles)
Can support about 4–6
simultaneous requests
Two Machine Scenario
Internet

Capacity



Web Server
AppServer
Configuration


Spatial
Server
ArcIMS 4

50,000 maps/day (8 max. req/s)
95% availability (18 days/yr)
1 machine for Web server and
AppServer
1 machine for spatial server and
shapefiles
Can support about 6–8
simultaneous requests
Three Machine + DB Server Scenario
Internet

Capacity


Web Server
AppServer

Configuration

Spatial
Server


ArcSDE 
Server
ArcIMS 4
150,000 maps/day (16 max.
req/s)
99% availability (3.6 days/yr)
1 machine for Web server and
AppServer
2 machines for spatial server
1 ArcSDE server
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


ArcSDE
Server
ArcIMS 4

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
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


ArcIMS 4
1 GB–2 GB RAM
2–450 MHz Processors
Hardware Configuration

AppServers/Spatial Servers

E450s, U420Rs



4 GB RAM
4–450 MHz Processors
Spatial Servers

E250s, U220Rs, U420Rs


ArcIMS 4
2 GB RAM
2–450 MHz Processors
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: [email protected]
ArcIMS 4