Data replication is one of the well-knowntechniques to reduce the cost of data access and networkbandwidth consumption, as well as to improve data availabilityin data grid. The challenge in replica managementis to select a set of suitable nodes for replicas and it isknown as replica placement problem. In this paper, we addressreplica placement problem in data grid under giventraffic pattern and propose a replica placement algorithmbased on dynamic programming. It can help us find an optimalnode set for replicas subject to workload constraintof all replicas while total communications cost in data gridis minimized. Numerical example and experiments showthat our algorithm is feasible and effective for the replicaplacement problem.